Commit c6362d0
CI: install pytest-xdist; fix cross-drive Windows failure in new tests
pytest-xdist was never installed by tests.yml on any platform, so every
test in test_xdist.py (importorskip("xdist")) -- including the new
test_xdist_fail_under_uses_merged_coverage -- was silently skipped in
CI, on every run. Add it alongside pytest in the cross-platform
install step (test_xdist.py already self-skips on Windows via its own
pytestmark, so this activates it for Linux/macOS).
Also fixes a real Windows CI failure this surfaced in the sibling
test_fail_under_precedence_with_failing_pytest_run: GitHub Actions
Windows runners check the repo out to D:\, while tmp_path resolves
under C:\Users\...\Temp. Passing an absolute C:\ file to `-m pytest`
while cwd sat on D:\ made pytest's rootdir/common-ancestor computation
fall back to scanning a drive root, hitting the classic
"C:\Documents and Settings" permission-denied junction. Fixed by
running the inner subprocess with cwd=tmp_path and a relative filename
instead, which also lets the now-unnecessary --source argument be
dropped (default cwd-relative file matching covers it). Applied the
same pattern to test_xdist_fail_under_uses_merged_coverage for
consistency, now that it actually runs in CI.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 7c34555 commit c6362d0
3 files changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
760 | | - | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
761 | 763 | | |
762 | 764 | | |
763 | 765 | | |
764 | 766 | | |
765 | | - | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
766 | 770 | | |
767 | 771 | | |
768 | 772 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
257 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| |||
0 commit comments