Repository navigation
test: skip POSIX-venv wheel-build tests on Windows - #4078
Merged
gaborbernat merged 1 commit intoSep 19, 2026
Merged
gaborbernat merged 1 commit into
gaborbernat merged 1 commit into
Conversation
test_build_wheel_in_{non_base,free_threaded,debug}_pkg_env mock a POSIX venv by creating a bin/python symlink to sys.executable. os.symlink raises OSError (WinError 1314) on Windows without elevation or Developer Mode, erroring these tests in setup; the mocked layout is POSIX-only regardless. Guard with skipif(sys.platform == 'win32'), matching the convention already used across the suite.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gaborbernat
approved these changes
Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
test_build_wheel_in_non_base_pkg_env,test_build_wheel_in_free_threaded_pkg_env,and
test_build_wheel_in_debug_pkg_env(intests/tox_env/python/test_python_api.py)error in setup on Windows without elevation or Developer Mode:
Each mocks a virtualenv via
_fake_session, which builds a POSIX layout by creating abin/pythonsymlink tosys.executable.os.symlinkneeds a privilege an ordinaryWindows user doesn't have, and the
bin/pythonlayout is POSIX-only regardless (Windowsvenvs use
Scripts\python.exe). CI stays green because thewindows-latestrunner cancreate symlinks, so this only bites an unprivileged Windows contributor's local run.
Fix
Guard the three tests with
@pytest.mark.skipif(sys.platform == "win32", ...), matchingthe convention already used throughout the suite (e.g.
tests/execute/local_subprocess/).Note
Verified with
py_compileand by inspection. If you'd rather keep Windows coverage bymaking the mock cross-platform (
Scripts/python.exeon Windows, no symlink), happy to dothat instead — the skip is the minimal, convention-matching option.
🤖 Generated with Claude Code