first commit

This commit is contained in:
Leonid Pershin
2026-08-21 02:42:48 +03:00
commit 167d07a733
46 changed files with 3334 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
"""Keep tests from picking up a real ~/.gpu-rent/.env or OS_* from the shell."""
import pytest
OS_KEYS = (
"OS_AUTH_URL",
"OS_USER_DOMAIN_NAME",
"OS_USERNAME",
"OS_PASSWORD",
"OS_PROJECT_ID",
"OS_REGION_NAME",
"GPU_RENT_AZ",
"CIVITAI_API_TOKEN",
)
@pytest.fixture(autouse=True)
def isolate_home(tmp_path, monkeypatch):
monkeypatch.setenv("HOME", str(tmp_path))
monkeypatch.setenv("USERPROFILE", str(tmp_path))
monkeypatch.chdir(tmp_path)
for key in OS_KEYS:
monkeypatch.delenv(key, raising=False)
return tmp_path