mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-19 08:31:01 +03:00
python.tests: also test virtualenv
Test whether creating a virtualenv functions.
This commit is contained in:
parent
dc80e0724c
commit
2de446e0b8
2 changed files with 20 additions and 1 deletions
|
@ -16,6 +16,7 @@ ENV = "@env@"
|
|||
INTERPRETER = "@interpreter@"
|
||||
PYTHON_VERSION = "@pythonVersion@"
|
||||
|
||||
IS_VIRTUALENV = @is_virtualenv@
|
||||
IS_VENV = @is_venv@
|
||||
IS_NIXENV = @is_nixenv@
|
||||
IS_PYPY = platform.python_implementation() == "PyPy"
|
||||
|
@ -37,7 +38,7 @@ class TestCasePython(unittest.TestCase):
|
|||
|
||||
@unittest.skipIf(IS_PYPY or sys.version_info.major==2, "Python 2 does not have base_prefix")
|
||||
def test_base_prefix(self):
|
||||
if IS_VENV or IS_NIXENV:
|
||||
if IS_VENV or IS_NIXENV or IS_VIRTUALENV:
|
||||
self.assertNotEqual(sys.prefix, sys.base_prefix)
|
||||
else:
|
||||
self.assertEqual(sys.prefix, sys.base_prefix)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue