Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ jobs:
python-version: ${{ matrix.python-version }}
- run: pip install -e . pytest
- run: pytest tests/ -v
env:
SWATGENX_API_KEY: ${{ secrets.SWATGENX_API_KEY }}
4 changes: 3 additions & 1 deletion tests/test_public.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ def test_access_info_ladder():
assert len(info.get("tiers", [])) == 4


def test_client_requires_key():
def test_client_requires_key(monkeypatch):
# Client falls back to SWATGENX_API_KEY, which CI now sets; clear it so this still tests the no-key path.
monkeypatch.delenv("SWATGENX_API_KEY", raising=False)
with pytest.raises(sg.SwatGenXError, match="API key"):
sg.Client(api_key="")

Expand Down
Loading