Commit 0d8c106
fix(test): set USERPROFILE in test-int config_home fixture on Windows
Hundreds of ``test-int/`` tests were failing on Windows CI with
``Project not found: 'main'`` after resolve_data_dir() was simplified
to use ``Path.home()`` directly (#743).
Root cause: ``Path.home()`` reads ``$HOME`` on POSIX and ``%USERPROFILE%``
on Windows. The ``test-int/conftest.py`` ``config_home`` fixture only
monkeypatched ``HOME``, which worked before because
``ConfigManager.data_dir_path`` used ``os.getenv("HOME", Path.home())``
— that preferred ``HOME`` even on Windows. Now that ``Path.home()`` is
called directly, ``USERPROFILE`` wins and the fixture redirects
nothing, so the test data dir falls back to the real user home where
no ``main`` project is configured.
Mirror the pattern already used in ``tests/conftest.py:config_home``:
when running on Windows, also set ``USERPROFILE`` to ``tmp_path`` so
``Path.home()`` sees the redirected location.
No-op on POSIX.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Drew Cain <groksrc@gmail.com>1 parent fe92c06 commit 0d8c106
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
310 | 314 | | |
| 315 | + | |
| 316 | + | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
| |||
0 commit comments