Skip to content

Commit f0b366a

Browse files
authored
bpo-35313: Cleanup test_embed.py (GH-10716)
* Remove an unused import. * Move get_expected_config() call to check_config() to ease backport to Python 3.7.
1 parent a6537fb commit f0b366a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/test/test_embed.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,6 @@ def get_expected_config(self, expected, env):
408408

409409
code = textwrap.dedent('''
410410
import json
411-
import locale
412411
import sys
413412
414413
data = {
@@ -449,8 +448,7 @@ def get_expected_config(self, expected, env):
449448
expected[key] = config[key]
450449
return expected
451450

452-
def check_core_config(self, config, expected, env):
453-
expected = self.get_expected_config(expected, env)
451+
def check_core_config(self, config, expected):
454452
core_config = dict(config['core_config'])
455453
for key in self.UNTESTED_CORE_CONFIG:
456454
core_config.pop(key, None)
@@ -485,7 +483,8 @@ def check_config(self, testname, expected):
485483
# Ignore err
486484
config = json.loads(out)
487485

488-
self.check_core_config(config, expected, env)
486+
expected = self.get_expected_config(expected, env)
487+
self.check_core_config(config, expected)
489488
self.check_main_config(config)
490489
self.check_global_config(config)
491490

0 commit comments

Comments
 (0)