From 1343d3cda7008b3b5a7aa35904b03c5281b48ac7 Mon Sep 17 00:00:00 2001 From: Peter Rice Date: Sat, 16 Aug 2025 00:49:21 -0400 Subject: [PATCH] fixup! patch qbpm.paths to prevent tests touching $HOME --- src/qbpm/main.py | 5 ++++- tests/__init__.py | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qbpm/main.py b/src/qbpm/main.py index 3c63a81..cafae53 100644 --- a/src/qbpm/main.py +++ b/src/qbpm/main.py @@ -261,7 +261,10 @@ def session_info( session_path = next(filter(lambda path: path.is_file(), session_paths), None) if session_path: - return (Profile(profile_name or session_path.stem, **vars(context)), session_path) + return ( + Profile(profile_name or session_path.stem, **vars(context)), + session_path, + ) tried = or_phrase([str(p.resolve()) for p in session_paths]) error(f"could not find session file at {tried}") sys.exit(1) diff --git a/tests/__init__.py b/tests/__init__.py index 8076cb0..a977695 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -5,6 +5,5 @@ import pytest @pytest.fixture(autouse=True) def no_homedir_fixture(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: - monkeypatch.setattr("qbpm.paths.default_qbpm_config_dir", lambda: tmp_path) monkeypatch.setattr("qbpm.paths.default_qbpm_application_dir", lambda: tmp_path) monkeypatch.setattr("qbpm.paths.default_profile_dir", lambda: tmp_path) -- 2.51.2