[Python-checkins] bpo-35313: Cleanup test_embed.py (GH-10716)
Victor Stinner
webhook-mailer at python.org
Mon Nov 26 06:37:38 EST 2018
https://github.com/python/cpython/commit/f0b366a8d7e0f12d4448f570e990de414f4afca7
commit: f0b366a8d7e0f12d4448f570e990de414f4afca7
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018-11-26T12:37:34+01:00
summary:
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.
files:
M Lib/test/test_embed.py
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index b6c25e3f7eda..d35b9f4d5a2f 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -408,7 +408,6 @@ def get_expected_config(self, expected, env):
code = textwrap.dedent('''
import json
- import locale
import sys
data = {
@@ -449,8 +448,7 @@ def get_expected_config(self, expected, env):
expected[key] = config[key]
return expected
- def check_core_config(self, config, expected, env):
- expected = self.get_expected_config(expected, env)
+ def check_core_config(self, config, expected):
core_config = dict(config['core_config'])
for key in self.UNTESTED_CORE_CONFIG:
core_config.pop(key, None)
@@ -485,7 +483,8 @@ def check_config(self, testname, expected):
# Ignore err
config = json.loads(out)
- self.check_core_config(config, expected, env)
+ expected = self.get_expected_config(expected, env)
+ self.check_core_config(config, expected)
self.check_main_config(config)
self.check_global_config(config)
More information about the Python-checkins
mailing list