Skip to content

Commit 6b500b2

Browse files
committed
test_central_lib_dir: skip gem in post-install loop on Windows too
The inline script's gem portion is gated on Windows but the post-script assertion loop still unconditionally expected a gem key in the returned payload — triggering KeyError: 'gem'. Match the script-side guard here so the loop only looks for gem when the script ran its gem install.
1 parent 29c3b77 commit 6b500b2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_central_lib_dir.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ def test_real_installs_land_under_abxpkg_lib_dir(self, test_machine):
335335
"bun",
336336
"deno",
337337
"cargo",
338-
"gem",
338+
# ``gem`` is only installed on non-Windows (see the
339+
# platform guard in the script above + the conftest
340+
# Unix-only-provider skip).
341+
*(() if IS_WINDOWS else ("gem",)),
339342
):
340343
reported = Path(payload[provider_name])
341344
assert reported == lib_dir.resolve() / provider_name, (

0 commit comments

Comments
 (0)