From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 18 Jun 2025 03:17:22 +0000 (+0200) Subject: [3.14] gh-127146: Allow ignored keys to be missing in test_sysconfig (GH-135622)... X-Git-Tag: v3.14.0b4~157 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=77e2ac14c626ff64ee90e73ac29dc2a60786335e;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-127146: Allow ignored keys to be missing in test_sysconfig (GH-135622) (#135650) Fixes the test on Emscripten where userbase can be missing. (cherry picked from commit 28c71ee4b2eb66983b78018896ca56892580816a) Co-authored-by: Hood Chatham --- diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index d30f69ded664..7af3144d6919 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -712,8 +712,8 @@ class TestSysConfig(unittest.TestCase, VirtualEnvironmentMixin): ignore_keys |= {'prefix', 'exec_prefix', 'base', 'platbase', 'installed_base', 'installed_platbase'} for key in ignore_keys: - json_config_vars.pop(key) - system_config_vars.pop(key) + json_config_vars.pop(key, None) + system_config_vars.pop(key, None) self.assertEqual(system_config_vars, json_config_vars)