Skip to content

Commit 1343d3c

Browse files
committed
fixup! patch qbpm.paths to prevent tests touching $HOME
1 parent a544eb6 commit 1343d3c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/qbpm/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ def session_info(
261261
session_path = next(filter(lambda path: path.is_file(), session_paths), None)
262262

263263
if session_path:
264-
return (Profile(profile_name or session_path.stem, **vars(context)), session_path)
264+
return (
265+
Profile(profile_name or session_path.stem, **vars(context)),
266+
session_path,
267+
)
265268
tried = or_phrase([str(p.resolve()) for p in session_paths])
266269
error(f"could not find session file at {tried}")
267270
sys.exit(1)

tests/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55

66
@pytest.fixture(autouse=True)
77
def no_homedir_fixture(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
8-
monkeypatch.setattr("qbpm.paths.default_qbpm_config_dir", lambda: tmp_path)
98
monkeypatch.setattr("qbpm.paths.default_qbpm_application_dir", lambda: tmp_path)
109
monkeypatch.setattr("qbpm.paths.default_profile_dir", lambda: tmp_path)

0 commit comments

Comments
 (0)