]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-127146: Allow ignored keys to be missing in test_sysconfig (#135622)
authorHood Chatham <roberthoodchatham@gmail.com>
Wed, 18 Jun 2025 02:51:46 +0000 (19:51 -0700)
committerGitHub <noreply@github.com>
Wed, 18 Jun 2025 02:51:46 +0000 (10:51 +0800)
Fixes the test on Emscripten where userbase can be missing.

Lib/test/test_sysconfig.py

index 2c0df9376abfc66c4ad96489b6808755c6b56395..2eb8de4b29fe96131f1aeba5aef4d9a6c177ff38 100644 (file)
@@ -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)