Files
2026-10-07 00:22:08 +02:00

25 lines
804 B
Python

"""Shared test data: the four frozen DSZO pages and where they came from."""
from pathlib import Path
from timetable import Timetable, parse_page
ROOT = Path(__file__).resolve().parent.parent
FIXTURES = Path(__file__).parent / "fixtures"
FONT_DIR = str(ROOT / "assets" / "fonts")
# (fixture file, line, stop) — same order as lines.yaml
SOURCES = [
("line4_u_potoka.html", "4", "Štípa,u potoka"),
("line5_u_potoka.html", "5", "Štípa,u potoka"),
("line35_druzstvo.html", "35", "Štípa,družstvo"),
("line36_druzstvo.html", "36", "Štípa,družstvo"),
]
def fixture_html(name: str) -> str:
return (FIXTURES / name).read_text(encoding="utf-8")
def load_timetables() -> list[Timetable]:
return [parse_page(fixture_html(name), line, stop) for name, line, stop in SOURCES]