]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-127146: Allow ignored keys to be missing in test_sysconfig (GH-135622)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 18 Jun 2025 03:17:22 +0000 (05:17 +0200)
committerGitHub <noreply@github.com>
Wed, 18 Jun 2025 03:17:22 +0000 (03:17 +0000)
Fixes the test on Emscripten where userbase can be missing.
(cherry picked from commit 28c71ee4b2eb66983b78018896ca56892580816a)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Lib/test/test_sysconfig.py

index d30f69ded6643a5a17ac7d22860f92ae0f7ad9e2..7af3144d69197e3d53d3a1b188320ce8c17f61a1 100644 (file)
@@ -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)