Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_sys.py @ 77154:294f8aeb4d4b
Implemented PEP 405 (Python virtual environments).
| author | Vinay Sajip <vinay_sajip@yahoo.co.uk> |
|---|---|
| date | Sat, 26 May 2012 03:45:29 +0100 |
| parents | b0eb7d2a9542 |
| children | bc0281f85409 |
line wrap: on
line diff
--- a/Lib/test/test_sys.py Sat May 26 03:25:23 2012 +0100 +++ b/Lib/test/test_sys.py Sat May 26 03:45:29 2012 +0100 @@ -419,6 +419,7 @@ self.assertIsInstance(sys.builtin_module_names, tuple) self.assertIsInstance(sys.copyright, str) self.assertIsInstance(sys.exec_prefix, str) + self.assertIsInstance(sys.base_exec_prefix, str) self.assertIsInstance(sys.executable, str) self.assertEqual(len(sys.float_info), 11) self.assertEqual(sys.float_info.radix, 2) @@ -450,6 +451,7 @@ self.assertEqual(sys.maxunicode, 0x10FFFF) self.assertIsInstance(sys.platform, str) self.assertIsInstance(sys.prefix, str) + self.assertIsInstance(sys.base_prefix, str) self.assertIsInstance(sys.version, str) vi = sys.version_info self.assertIsInstance(vi[:], tuple) @@ -541,6 +543,8 @@ out = p.communicate()[0].strip() self.assertEqual(out, b'?') + @unittest.skipIf(sys.base_prefix != sys.prefix, + 'Test is not venv-compatible') def test_executable(self): # sys.executable should be absolute self.assertEqual(os.path.abspath(sys.executable), sys.executable)
