Skip to content

Commit

Permalink
test: don't assume GITHUB_WORKSPACE (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
woodruffw authored Dec 3, 2024
1 parent d4049ea commit 85d2d42
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/test_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,12 @@ def test_verify_rejects_mismatched_hashedrekord(


def test_verify_cpython_release_bundles(subtests, client):
cpython_release_dir = Path(os.getenv("GITHUB_WORKSPACE")) / "cpython-release-tracker"
if not cpython_release_dir.is_dir():
pytest.skip("cpython-release-tracker data is not available")
if gh_workspace := os.getenv("GITHUB_WORKSPACE"):
cpython_release_dir = Path(gh_workspace) / "cpython-release-tracker"
if not cpython_release_dir.is_dir():
pytest.skip("cpython-release-tracker data is not available")
else:
pytest.skip("GITHUB_WORKSPACE not set")

identities = json.loads((cpython_release_dir / "signing-identities.json").read_text())

Expand Down

0 comments on commit 85d2d42

Please sign in to comment.