Skip to content

Commit da87040

Browse files
committed
revert conftest changes that mess with environment variables
1 parent 77373e6 commit da87040

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

tests/conftest.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,9 @@
1-
import os
21
import subprocess
32
import time
43
from pathlib import Path
54

65
import pytest
76

8-
REQUIRED = {
9-
"DISCORD_TOKEN": "dummy",
10-
"GITHUB_TOKEN": "dummy",
11-
"GITHUB_REPO": "dummy",
12-
}
13-
14-
for k, v in REQUIRED.items():
15-
os.environ.setdefault(k, v)
16-
17-
@pytest.fixture(scope="session", autouse=True)
18-
def _restore_env():
19-
old = {k: os.environ.get(k) for k in REQUIRED}
20-
try:
21-
yield
22-
finally:
23-
for k, v in old.items():
24-
if v is None:
25-
os.environ.pop(k, None)
26-
else:
27-
os.environ[k] = v
28-
297
DATABASE_URL = "postgresql://postgres:postgres@localhost:5433/clusterdev"
308

319

0 commit comments

Comments
 (0)