Files
025-us-states-game/tests/test_constants.py
T
Tirsvad 22f19c188b Add repository baseline: layout, tooling, assets, README, Doxyfile and CI (MIL-001)
Task: MIL-001#1
Task: MIL-001#2
Task: MIL-001#3
Task: MIL-001#4
Task: MIL-001#5
Task: MIL-001#6
2026-10-13 15:46:00 +08:00

18 lines
565 B
Python

"""Smoke test: the constants point at the assignment files that ship with the game."""
from us_states_game import constants
def test_data_files_exist() -> None:
assert constants.STATES_CSV_PATH.is_file()
assert constants.MAP_IMAGE_PATH.is_file()
def test_states_csv_has_all_states() -> None:
lines = constants.STATES_CSV_PATH.read_text(encoding="utf-8").strip().splitlines()
assert (
lines[0]
== f"{constants.STATE_COLUMN},{constants.X_COLUMN},{constants.Y_COLUMN}"
)
assert len(lines) - 1 == constants.NUMBER_OF_STATES