Correct the contract docstring: detail is read by enrich, the example is Workday's, the touch points of a new reader

Adds the search providers' PARAMS, clean_params and company, and a test
that the example READS is workday.py's.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-30 15:54:13 +02:00
1 parent 72252a1c04
commit 2cc83b1d84
2 files changed
+105 -55

No files matched your search

+10
View File
@@ -32,6 +32,7 @@ already builds (Pinpoint's and HiBob's pay, SmartRecruiters' levels).
from __future__ import annotations
import sys
import textwrap
import types
from collections.abc import Callable
from pathlib import Path
@@ -535,6 +536,15 @@ def test_the_fixture_reader_drives_a_paged_module_and_detail() -> None:
assert place_problems(rows, "many") == []
def test_the_contracts_example_is_workdays_declaration() -> None:
doc = readers.__doc__ or ""
start = doc.index(" READS = Reads(")
source = textwrap.dedent(doc[start:doc.index("\n )\n", start) + 6])
namespace: dict[str, Any] = {"Reads": Reads, "Filters": Filters, "Fields": Fields}
exec(source, namespace)
assert namespace["READS"] == readers.READERS["workday"].READS
def test_the_contract_types_are_what_the_package_exports() -> None:
assert readers.Reads is _contract.Reads and readers.Row is _contract.Row
assert _contract.Place(text="Berlin", remote=None) == {"text": "Berlin", "remote": None}