mirror of
https://github.com/rr-/pq-cli.git
synced 2026-11-12 22:40:36 -07:00
tests: compare pqcli with upstream in node
`just test` now fetches Progress Quest web's game logic from the public site into $XDG_CACHE_HOME/pqcli/pq-web, pinned by SHA-256 so a change on the site fails loudly. Nothing from upstream is committed. tests/upstream/harness.js runs that code headless. test_upstream.py checks the word lists, MonsterTask and the other generators from 200 generator states, and three whole games of 10000 tasks each, comparing all state including the generator after every task. Without node or the fetched files, these tests are skipped.
This commit is contained in:
6 files changed
+556
-1
No files matched your search
@@ -16,8 +16,12 @@ basic *args:
|
||||
lint:
|
||||
uv run prek run -a
|
||||
|
||||
# Download Progress Quest web's game logic for the upstream tests
|
||||
fetch-upstream:
|
||||
uv run python tests/upstream/fetch.py
|
||||
|
||||
# Run the test suite; extra arguments go to pytest
|
||||
test *args:
|
||||
test *args: fetch-upstream
|
||||
uv run pytest {{args}}
|
||||
|
||||
# Re-record the gameplay parity fixtures (only when gameplay should change)
|
||||
|
||||
Reference in new issue
Block a user