Skip to content

Commit

Permalink
Postpone check for PYTEST_SECRETS_KEY
Browse files Browse the repository at this point in the history
  • Loading branch information
Baekalfen committed Dec 8, 2023
1 parent b212c13 commit 2dbf98e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,11 @@ def git_pyboy_rl():

@pytest.fixture(scope="session")
def secrets():
if not os.environ.get("PYTEST_SECRETS_KEY"):
pytest.skip("Cannot access secrets")

path = extra_test_rom_dir / Path("secrets")
with FileLock(path.with_suffix(".lock")) as lock:
if not os.path.isdir(path):
if not os.environ.get("PYTEST_SECRETS_KEY"):
pytest.skip("Cannot access secrets")
fernet = Fernet(os.environ["PYTEST_SECRETS_KEY"].encode())

test_data = url_open("https://pyboy.dk/mirror/test_data.encrypted")
Expand Down

0 comments on commit 2dbf98e

Please sign in to comment.