diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2017-05-23 04:36:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-23 04:36:03 (GMT) |
commit | 6b4be195cd8868b76eb6fbe166acc39beee8ce36 (patch) | |
tree | bbab44fad32c576b9eb7e4b83368e200adc33f00 /Lib/test/test_site.py | |
parent | f9169ce6b48c7cc7cc62d9eb5e4ee1ac7066d14b (diff) | |
download | cpython-6b4be195cd8868b76eb6fbe166acc39beee8ce36.zip cpython-6b4be195cd8868b76eb6fbe166acc39beee8ce36.tar.gz cpython-6b4be195cd8868b76eb6fbe166acc39beee8ce36.tar.bz2 |
bpo-22257: Small changes for PEP 432. (#1728)
PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes.
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r-- | Lib/test/test_site.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 3aa46df..0924f01 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -183,6 +183,7 @@ class HelperFunctionsTests(unittest.TestCase): @unittest.skipUnless(site.ENABLE_USER_SITE, "requires access to PEP 370 " "user-site (site.ENABLE_USER_SITE)") def test_s_option(self): + # (ncoghlan) Change this to use script_helper... usersite = site.USER_SITE self.assertIn(usersite, sys.path) @@ -199,7 +200,7 @@ class HelperFunctionsTests(unittest.TestCase): if usersite == site.getsitepackages()[0]: self.assertEqual(rc, 1) else: - self.assertEqual(rc, 0) + self.assertEqual(rc, 0, "User site still added to path with -s") env = os.environ.copy() env["PYTHONNOUSERSITE"] = "1" @@ -209,14 +210,16 @@ class HelperFunctionsTests(unittest.TestCase): if usersite == site.getsitepackages()[0]: self.assertEqual(rc, 1) else: - self.assertEqual(rc, 0) + self.assertEqual(rc, 0, + "User site still added to path with PYTHONNOUSERSITE") env = os.environ.copy() env["PYTHONUSERBASE"] = "/tmp" rc = subprocess.call([sys.executable, '-c', 'import sys, site; sys.exit(site.USER_BASE.startswith("/tmp"))'], env=env) - self.assertEqual(rc, 1) + self.assertEqual(rc, 1, + "User base not set by PYTHONUSERBASE") def test_getuserbase(self): site.USER_BASE = None |