Skip to content

Commit c6f435a

Browse files
committed
fix: ci on windows/mac
1 parent 28d5d80 commit c6f435a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_unix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def _func_to_path(func: str) -> XDGVariable | None:
9999
"user_cache_dir": XDGVariable("XDG_CACHE_HOME", "~/.cache"),
100100
"user_state_dir": XDGVariable("XDG_STATE_HOME", "~/.local/state"),
101101
"user_log_dir": XDGVariable("XDG_STATE_HOME", "~/.local/state"),
102-
"user_runtime_dir": XDGVariable("XDG_RUNTIME_DIR", "/tmp/runtime-1234"), # noqa: S108
102+
"user_runtime_dir": XDGVariable("XDG_RUNTIME_DIR", f"{gettempdir()}/runtime-1234"),
103103
"site_runtime_dir": XDGVariable("XDG_RUNTIME_DIR", "/run"),
104104
}
105105
return mapping.get(func)
@@ -160,7 +160,7 @@ def test_platform_on_bsd(monkeypatch: pytest.MonkeyPatch, mocker: MockerFixture,
160160
assert Unix().user_runtime_dir == "/var/run/user/1234"
161161

162162
mocker.patch("os.access", return_value=False)
163-
assert Unix().user_runtime_dir == "/tmp/runtime-1234" # noqa: S108
163+
assert Unix().user_runtime_dir == f"{gettempdir()}/runtime-1234"
164164

165165

166166
def test_platform_on_win32(monkeypatch: pytest.MonkeyPatch, mocker: MockerFixture) -> None:

0 commit comments

Comments
 (0)