Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-127146: Fix test_sysconfidata_json in Emscripten
The prefix is different when we build from when we run the test.
  • Loading branch information
hoodmane committed Jan 6, 2025
commit 6d02ccafafe50510eac49195bc4b8bdb1ceda721
11 changes: 8 additions & 3 deletions Lib/test/test_sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
is_android,
is_apple_mobile,
is_wasi,
is_emscripten,
PythonSymlink,
requires_subprocess,
)
Expand Down Expand Up @@ -651,9 +652,13 @@ def test_sysconfigdata_json(self):
system_config_vars = get_config_vars()

# Ignore keys in the check
for key in ('projectbase', 'srcdir'):
json_config_vars.pop(key)
system_config_vars.pop(key)
ignore_keys = ('projectbase', 'srcdir')
if is_emscripten:
ignore_keys += ("exec_prefix", "installed_base", "installed_platbase", "prefix", "platbase", "userbase")

for key in ignore_keys:
json_config_vars.pop(key, None)
system_config_vars.pop(key, None)

self.assertEqual(system_config_vars, json_config_vars)

Expand Down