From: Hood Chatham Date: Wed, 18 Jun 2025 02:51:46 +0000 (-0700) Subject: gh-127146: Allow ignored keys to be missing in test_sysconfig (#135622) X-Git-Tag: v3.15.0a1~1272 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28c71ee4b2eb66983b78018896ca56892580816a;p=thirdparty%2FPython%2Fcpython.git gh-127146: Allow ignored keys to be missing in test_sysconfig (#135622) Fixes the test on Emscripten where userbase can be missing. --- diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index 2c0df9376abf..2eb8de4b29fe 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -711,8 +711,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)