Test and check#
make ci
This runs each check that GitHub runs. make fmt fixes the format for you.
Check |
Command |
What it covers |
|---|---|---|
Lint and format |
|
ruff, pyproject-fmt, codespell, and zizmor for the GitHub workflows |
Sync client |
|
Fails if |
Types |
|
pyrefly in strict mode. It fails only on errors that are not in |
Tests |
|
pytest. It fails if coverage goes below 100%. |
Docs |
|
Sphinx. A warning stops the build. |
Build |
|
The sdist and the wheel. |
Each test runs 3 times#
Most tests run 3 times: against the sync client, and against the async client under asyncio and under trio. Thus the two clients cannot do different things.
Live check of the models#
A model skips a field that it does not declare. Thus a new field from Blizzard can go missing without an error. Two checks find it:
tests/test_models.pydecodes each recorded response, encodes it again, and fails on a field that went missing.make audit-modelsdoes the same check on each document that it can get from the live API. It needs the credentials from Run it locally, and it takes about 4 minutes.
Run make audit-models after a game patch. The
development guide gives the steps
to fix a model.