mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 22:52:42 +01:00
fix: monkeypatch system env
This commit is contained in:
1 parent
fa5f638697
commit
a7cfd4c346
2 files changed
+2
-3
No files matched your search
@@ -26,7 +26,7 @@ def state_files():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def xdg_paths():
|
def xdg_paths(monkeypatch):
|
||||||
routes = {
|
routes = {
|
||||||
"XDG_CONFIG_HOME": "",
|
"XDG_CONFIG_HOME": "",
|
||||||
"XDG_STATE_HOME": "",
|
"XDG_STATE_HOME": "",
|
||||||
@@ -37,7 +37,7 @@ def xdg_paths():
|
|||||||
tmp = tempfile.TemporaryDirectory(delete=False)
|
tmp = tempfile.TemporaryDirectory(delete=False)
|
||||||
routes[route] = tmp.name
|
routes[route] = tmp.name
|
||||||
for k, v in routes.items():
|
for k, v in routes.items():
|
||||||
os.environ[k] = v
|
monkeypatch.setenv(k, v)
|
||||||
env = get_xdg_paths()
|
env = get_xdg_paths()
|
||||||
return parse_filepaths(env)
|
return parse_filepaths(env)
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ def test_steam(config):
|
|||||||
key = config["steam_api"]
|
key = config["steam_api"]
|
||||||
assert probe.test_steam_api(key)
|
assert probe.test_steam_api(key)
|
||||||
|
|
||||||
|
|
||||||
def test_bm(config):
|
def test_bm(config):
|
||||||
key = config["bm_api"]
|
key = config["bm_api"]
|
||||||
assert probe.test_bm_api(key)
|
assert probe.test_bm_api(key)
|
||||||
Reference in new issue
Block a user