mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-19 08:31:01 +03:00
Python: fix virtualenv with Python 2
This commit is contained in:
parent
98bcf5d8da
commit
f17001afd8
5 changed files with 52 additions and 9 deletions
|
@ -43,6 +43,10 @@ class TestCasePython(unittest.TestCase):
|
|||
else:
|
||||
self.assertEqual(sys.prefix, sys.base_prefix)
|
||||
|
||||
@unittest.skipIf(sys.version_info.major==3, "sys.real_prefix is only set by virtualenv in case of Python 2.")
|
||||
def test_real_prefix(self):
|
||||
self.assertTrue(hasattr(sys, "real_prefix") == IS_VIRTUALENV)
|
||||
|
||||
def test_python_version(self):
|
||||
self.assertTrue(platform.python_version().startswith(PYTHON_VERSION))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue