Skip to content

Commit 6d02cca

Browse files
committed
gh-127146: Fix test_sysconfidata_json in Emscripten
The prefix is different when we build from when we run the test.
1 parent d50fa05 commit 6d02cca

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Lib/test/test_sysconfig.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
is_android,
1515
is_apple_mobile,
1616
is_wasi,
17+
is_emscripten,
1718
PythonSymlink,
1819
requires_subprocess,
1920
)
@@ -651,9 +652,13 @@ def test_sysconfigdata_json(self):
651652
system_config_vars = get_config_vars()
652653

653654
# Ignore keys in the check
654-
for key in ('projectbase', 'srcdir'):
655-
json_config_vars.pop(key)
656-
system_config_vars.pop(key)
655+
ignore_keys = ('projectbase', 'srcdir')
656+
if is_emscripten:
657+
ignore_keys += ("exec_prefix", "installed_base", "installed_platbase", "prefix", "platbase", "userbase")
658+
659+
for key in ignore_keys:
660+
json_config_vars.pop(key, None)
661+
system_config_vars.pop(key, None)
657662

658663
self.assertEqual(system_config_vars, json_config_vars)
659664

0 commit comments

Comments
 (0)