refactor: share official records parser

This commit is contained in:
ik
2026-09-03 18:53:03 +07:00
parent c4f4deb24b
commit fda2e5a7bc
7 changed files with 144 additions and 157 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ def _production_contract(html: str) -> list[tuple[object, ...]]:
]
def test_research_and_production_parsers_emit_the_same_contract() -> None:
def test_research_and_production_adapters_emit_the_same_shared_contract() -> None:
html = FIXTURE.read_text(encoding="utf-8")
assert _research_contract(html) == _production_contract(html)
@@ -41,5 +41,5 @@ def test_both_parsers_reject_a_changed_column_contract() -> None:
with pytest.raises(RecordsParseError, match="records columns changed"):
_research_contract(html)
with pytest.raises(ImportSourceError, match="record columns changed"):
with pytest.raises(ImportSourceError, match="records columns changed"):
_production_contract(html)