diff options
author | Brett Cannon <brett@python.org> | 2012-04-04 21:31:16 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-04 21:31:16 (GMT) |
commit | 8ac95ee62af237d21c695578cb19f54ddc1234a8 (patch) | |
tree | 6ccddc1d3a5ffa1f8dda1b75ff6b3b15ed9b3e20 /Lib/test/test_site.py | |
parent | 5ceef131d42852fc1db1de0dd565196c4e29a397 (diff) | |
download | cpython-8ac95ee62af237d21c695578cb19f54ddc1234a8.zip cpython-8ac95ee62af237d21c695578cb19f54ddc1234a8.tar.gz cpython-8ac95ee62af237d21c695578cb19f54ddc1234a8.tar.bz2 |
Fix test_site from modifying sysconfig._CONFIG_VARS.
Diffstat (limited to 'Lib/test/test_site.py')
-rw-r--r-- | Lib/test/test_site.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index ba42649..29286c7 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -39,6 +39,7 @@ class HelperFunctionsTests(unittest.TestCase): self.old_base = site.USER_BASE self.old_site = site.USER_SITE self.old_prefixes = site.PREFIXES + self.original_vars = sysconfig._CONFIG_VARS self.old_vars = copy(sysconfig._CONFIG_VARS) def tearDown(self): @@ -47,7 +48,9 @@ class HelperFunctionsTests(unittest.TestCase): site.USER_BASE = self.old_base site.USER_SITE = self.old_site site.PREFIXES = self.old_prefixes - sysconfig._CONFIG_VARS = self.old_vars + sysconfig._CONFIG_VARS = self.original_vars + sysconfig._CONFIG_VARS.clear() + sysconfig._CONFIG_VARS.update(self.old_vars) def test_makepath(self): # Test makepath() have an absolute path for its first return value |