mirror of
https://github.com/rr-/pq-cli.git
synced 2026-11-12 22:40:36 -07:00
tests: play shorter games when comparing
The upstream games ran 10000 tasks and the .pqw comparisons 3000 or 2000 more. Differences so far showed within the first few tasks, so 3000, 1000 and 500 keep the tests sharp at a fraction of the time. Two .pqw save points that tested nothing new are dropped.
This commit is contained in:
2 files changed
+8
-10
No files matched your search
+2
-4
@@ -130,7 +130,7 @@ def test_export_of_unplayed_character() -> None:
|
||||
assert player.task is None # exported a copy
|
||||
|
||||
|
||||
@pytest.mark.parametrize("ticks", [0, 1, 25, 3000, 40000, 123457])
|
||||
@pytest.mark.parametrize("ticks", [0, 25, 3000, 123457])
|
||||
def test_round_trip_keeps_playing_identically(ticks: int) -> None:
|
||||
original = played(ticks)
|
||||
copy, _warnings = import_game(
|
||||
@@ -138,9 +138,7 @@ def test_round_trip_keeps_playing_identically(ticks: int) -> None:
|
||||
)
|
||||
assert bridge.snapshot(copy) == bridge.snapshot(original.player)
|
||||
resumed = Simulation(copy, DATA)
|
||||
assert bridge.run(resumed, 10**8, 2000) == bridge.run(
|
||||
original, 10**8, 2000
|
||||
)
|
||||
assert bridge.run(resumed, 10**8, 500) == bridge.run(original, 10**8, 500)
|
||||
|
||||
|
||||
def test_files_round_trip(tmp_path: Path) -> None:
|
||||
|
||||
Reference in new issue
Block a user