From 55551bd456e3c0a23e30fb1894a11e22937da134 Mon Sep 17 00:00:00 2001 From: sfw Date: Fri, 20 Mar 2026 02:28:05 -0600 Subject: [PATCH] Isolate pytest home directory --- tests/conftest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index cd4ee9b..c3b99d9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -32,6 +32,11 @@ def restore_dibble_logger_state(): logger.disabled = original_disabled +@pytest.fixture(autouse=True) +def isolate_home_directory(tmp_path, monkeypatch): + monkeypatch.setenv("HOME", str(tmp_path)) + + @pytest.fixture def app_settings(tmp_path): return Settings(database_path=str(tmp_path / "dibble-test.db"))