Skip to content

Commit b76fdb7

Browse files
fix(tests): expand tilde test — set USERPROFILE for Windows CI
ntpath.expanduser uses USERPROFILE on Windows; HOME is ignored. Setting both keeps the test portable across POSIX and Windows runners.
1 parent 086e597 commit b76fdb7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tests/test_cs_report.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ def test_save_to_expands_tilde(tmp_path, monkeypatch):
277277
"""`save_to='~/foo/bar'` should expand the home directory."""
278278
df = _staggered_panel(seed=31)
279279
monkeypatch.setenv("HOME", str(tmp_path))
280+
monkeypatch.setenv("USERPROFILE", str(tmp_path)) # ntpath.expanduser uses USERPROFILE on Windows
280281
cs_report(df, y='y', g='g', t='t', i='i',
281282
n_boot=50, random_state=0, verbose=False,
282283
save_to='~/cs_study/rpt')

0 commit comments

Comments
 (0)