mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
bpo-36160: Fix test_site so that it can run independently of other tests (GH-12131)
This commit is contained in:
parent
58a993957a
commit
1270ad6ec8
1 changed files with 4 additions and 2 deletions
|
|
@ -79,8 +79,10 @@ class HelperFunctionsTests(unittest.TestCase):
|
||||||
site.USER_SITE = self.old_site
|
site.USER_SITE = self.old_site
|
||||||
site.PREFIXES = self.old_prefixes
|
site.PREFIXES = self.old_prefixes
|
||||||
sysconfig._CONFIG_VARS = self.original_vars
|
sysconfig._CONFIG_VARS = self.original_vars
|
||||||
sysconfig._CONFIG_VARS.clear()
|
# _CONFIG_VARS is None before get_config_vars() is called
|
||||||
sysconfig._CONFIG_VARS.update(self.old_vars)
|
if sysconfig._CONFIG_VARS is not None:
|
||||||
|
sysconfig._CONFIG_VARS.clear()
|
||||||
|
sysconfig._CONFIG_VARS.update(self.old_vars)
|
||||||
|
|
||||||
def test_makepath(self):
|
def test_makepath(self):
|
||||||
# Test makepath() have an absolute path for its first return value
|
# Test makepath() have an absolute path for its first return value
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue