Commit 2f96e32
test: skip POSIX-venv wheel-build tests on Windows (tox-dev#4078)
## 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` (in
`tests/tox_env/python/test_python_api.py`)
error in setup on Windows without elevation or Developer Mode:
```
OSError: [WinError 1314] A required privilege is not held by the client
```
Each mocks a virtualenv via `_fake_session`, which builds a POSIX layout
by creating a
`bin/python` symlink to `sys.executable`. `os.symlink` needs a privilege
an ordinary
Windows user doesn't have, and the `bin/python` layout is POSIX-only
regardless (Windows
venvs use `Scripts\python.exe`). CI stays green because the
`windows-latest` runner can
create symlinks, so this only bites an unprivileged Windows
contributor's local run.
## Fix
Guard the three tests with `@pytest.mark.skipif(sys.platform == "win32",
...)`, matching
the convention already used throughout the suite (e.g.
`tests/execute/local_subprocess/`).
## Note
Verified with `py_compile` and by inspection. If you'd rather keep
Windows coverage by
making the mock cross-platform (`Scripts/python.exe` on Windows, no
symlink), happy to do
that instead — the skip is the minimal, convention-matching option.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 99f4421 commit 2f96e32
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| 149 | + | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
| |||
0 commit comments