Skip to content

Commit 28c71ee

Browse files
authored
gh-127146: Allow ignored keys to be missing in test_sysconfig (#135622)
Fixes the test on Emscripten where userbase can be missing.
1 parent 7117002 commit 28c71ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_sysconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,8 @@ def test_sysconfigdata_json(self):
711711
ignore_keys |= {'prefix', 'exec_prefix', 'base', 'platbase', 'installed_base', 'installed_platbase'}
712712

713713
for key in ignore_keys:
714-
json_config_vars.pop(key)
715-
system_config_vars.pop(key)
714+
json_config_vars.pop(key, None)
715+
system_config_vars.pop(key, None)
716716

717717
self.assertEqual(system_config_vars, json_config_vars)
718718

0 commit comments

Comments
 (0)