mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-16 15:40:12 +01:00
feat(themes): whitelist governance, synergy cap, docs + tests; feat(random): laid roadwork for random implementation, testing in headless confirmed
This commit is contained in:
parent
03e839fb87
commit
16261bbf09
34 changed files with 12594 additions and 23 deletions
18
code/tests/test_seeded_builder_minimal.py
Normal file
18
code/tests/test_seeded_builder_minimal.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from code.headless_runner import run
|
||||
|
||||
|
||||
def test_headless_seed_threads_into_builder(monkeypatch):
|
||||
# Use the tiny test dataset for speed/determinism
|
||||
monkeypatch.setenv("CSV_FILES_DIR", os.path.join("csv_files", "testdata"))
|
||||
# Use a commander known to be in tiny dataset or fallback path; we rely on search/confirm flow
|
||||
# Provide a simple name that will fuzzy match one of the entries.
|
||||
out1 = run(command_name="Krenko", seed=999)
|
||||
out2 = run(command_name="Krenko", seed=999)
|
||||
# Determinism: the seed should be set on the builder and identical across runs
|
||||
assert getattr(out1, "seed", None) == getattr(out2, "seed", None) == 999
|
||||
# Basic sanity: commander selection should have occurred
|
||||
assert isinstance(getattr(out1, "commander_name", ""), str)
|
||||
assert isinstance(getattr(out2, "commander_name", ""), str)
|
||||
Loading…
Add table
Add a link
Reference in a new issue