From a7cfd4c34650b108d3fdb7e55a069ae9eff675e8 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 7 Jul 2026 16:28:52 +0900 Subject: [PATCH] fix: monkeypatch system env --- tests/test_bare_conf_files.py | 4 ++-- tests/test_remote_api.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_bare_conf_files.py b/tests/test_bare_conf_files.py index d090f50..f55765e 100644 --- a/tests/test_bare_conf_files.py +++ b/tests/test_bare_conf_files.py @@ -26,7 +26,7 @@ def state_files(): @pytest.fixture -def xdg_paths(): +def xdg_paths(monkeypatch): routes = { "XDG_CONFIG_HOME": "", "XDG_STATE_HOME": "", @@ -37,7 +37,7 @@ def xdg_paths(): tmp = tempfile.TemporaryDirectory(delete=False) routes[route] = tmp.name for k, v in routes.items(): - os.environ[k] = v + monkeypatch.setenv(k, v) env = get_xdg_paths() return parse_filepaths(env) diff --git a/tests/test_remote_api.py b/tests/test_remote_api.py index 1cd4989..e47a4d6 100644 --- a/tests/test_remote_api.py +++ b/tests/test_remote_api.py @@ -20,7 +20,6 @@ def test_steam(config): key = config["steam_api"] assert probe.test_steam_api(key) - def test_bm(config): key = config["bm_api"] assert probe.test_bm_api(key)