8000 bpo-36160: Fix test_site so that it can run independently of other te… · python/cpython@4389711 · GitHub
[go: up one dir, main page]

Skip to content
6614

Commit 4389711

Browse files
bpo-36160: Fix test_site so that it can run independently of other tests (GH-12131) (GH-26262)
(cherry picked from commit 1270ad6) Co-authored-by: native-api <vano@mail.mipt.ru>
1 parent 548d882 commit 4389711

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_site.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ def tearDown(self):
7979
site.USER_SITE = self.old_site
8080
site.PREFIXES = self.old_prefixes
< 7DFF div aria-hidden="true" class="position-absolute top-0 d-flex user-select-none DiffLineTableCellParts-module__comment-indicator--eI0hb">
8181
sysconfig._CONFIG_VARS = self.original_vars
82-
sysconfig._CONFIG_VARS.clear()
83-
sysconfig._CONFIG_VARS.update(self.old_vars)
82+
# _CONFIG_VARS is None before get_config_vars() is called
83+
if sysconfig._CONFIG_VARS is not None:
84+
sysconfig._CONFIG_VARS.clear()
85+
sysconfig._CONFIG_VARS.update(self.old_vars)
8486

8587
def test_makepath(self):
8688
# Test makepath() have an absolute path for its first return value

0 commit comments

Comments
 (0)
0