You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tests): set hermetic HOME at conftest import time for Windows xdist workers (#1271)
The previous session-scoped autouse fixture in tests/unit/conftest.py
fixed most Windows runner failures, but a single xdist worker (gw2)
still hit 53 'RuntimeError: Could not determine home directory' on
the windows-2025-vs2026 image -- some test or fixture resolved
Path.home() before the autouse fixture's setup ran on that worker.
Move the env mutation to module-level import time. Each xdist worker
imports tests/unit/conftest.py once, before any fixture or collection
runs, so HOME / USERPROFILE / HOMEDRIVE / HOMEPATH are guaranteed to
be set before anything in the worker process can call Path.home().
Refs run https://github.com/microsoft/apm/actions/runs/25665840560
Co-authored-by: Daniel Meppiel <copilot-rework@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
12
12
- Pin `Path.home()` under unit tests via a session-scoped autouse conftest fixture, fixing 56 Windows runner failures on the new `windows-2025-vs2026` GitHub-hosted image where `USERPROFILE`/`HOMEDRIVE`+`HOMEPATH` are not seeded for pytest workers; also patch the `_check_and_notify_updates` import binding in the disabled-self-update test so it no longer races on the version-check cache. (#1270)
13
13
-`apm install` now works on macOS git 2.53.0 (Homebrew): bare-cache commands switch to `--git-dir` to satisfy the `safe.bareRepository=explicit` default; fetched SHAs are pinned as synthetic refs so `git clone --local --shared` no longer silently omits them. (#1268)
14
+
- Set the unit-test hermetic HOME at conftest import time so a single xdist worker on the `windows-2025-vs2026` runner can no longer race fixture setup and re-trigger the 53 `Path.home()` failures the session-scoped autouse fixture was supposed to prevent. (#1271)
0 commit comments