refactor: share official records parser
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user