test(fixtures): replace sector-specific example material with generic, fictitious examples — green
Every fixture, test document, tool example and document now uses an invented kitchen-and-baking handbook series, written in this repository. The package's behaviour is unchanged; src/ changes are comments and help text only. - Generated fixtures are regenerated from their generators. Their structural counts are identical before and after: elements, images, rows, cells, headings, bookmarks and the witness inventory's per-document totals. The image-inbox and accounting documents are renamed kapittel-84-*. - tools/okf_accounting_gate.py: the two options that named one real corpus each are replaced by a generic, repeatable --corpus PATH with no default. Row 5 compares the PDF pair alone. Gate verdict unchanged: RED rows 2, 3, 6. - tools/okf_witness.py: the STS JSON reader for one publisher's delivery is removed, along with its three twins and five tests. The mutation harness loses W09. - docs/: 13 dated reports that documented runs on a retired reference corpus are removed, and 40 are neutralized. Dead links are removed, and no new dangling path is introduced. - The synthetic MCP-gate corpus and the residual probe words are neutral. Valgt: keep the `okf quality --fasit` bar value (the measured fraction, one corpus) and rewrite only its provenance, because the verdict stays unchanged and the number names nothing. Term check with the local list: 0 of 411 tracked files, 0 file names, 0 of 27 binary fixtures. Suite after git add: 2457 passed, 1 skipped. The base tree had 2460 passed and 2 skipped; five tests went with the JSON reader and four were added by the term check. ruff, ruff format and mypy --strict src/ are clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1e7345a401
commit
9d1f4b14ed
174 changed files with 1889 additions and 6512 deletions
|
|
@ -117,8 +117,8 @@ def test_the_two_synthetic_bundles_share_no_question_token(scratch: Path) -> Non
|
|||
}
|
||||
for name, root in bundles.items()
|
||||
}
|
||||
shared = words["bridge-notes"] & words["kitchen-notes"]
|
||||
assert "spennvidde" not in shared
|
||||
shared = words["garden-notes"] & words["kitchen-notes"]
|
||||
assert "bedbredde" not in shared
|
||||
assert "surdeig" not in shared
|
||||
|
||||
|
||||
|
|
@ -131,8 +131,8 @@ def test_a_question_set_whose_bytes_moved_is_a_usage_error_not_a_red_row(
|
|||
payload = {
|
||||
"sporsmal": [
|
||||
{
|
||||
"bundles": ["bridge-notes"],
|
||||
"atomer": [{"kilde_anker": "spennvidde", "kilde_sitat": "24 meter"}],
|
||||
"bundles": ["garden-notes"],
|
||||
"atomer": [{"kilde_anker": "bedbredde", "kilde_sitat": "24 meter"}],
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -145,7 +145,7 @@ def test_a_question_set_whose_bytes_moved_is_a_usage_error_not_a_red_row(
|
|||
json.dumps({"versjon": 4, "sha256": {"sporsmal.json": digest}}), encoding="utf-8"
|
||||
)
|
||||
anchors = gate.read_anchor_set(questions, freeze, want_version=4)
|
||||
assert anchors.pairs == (("bridge-notes", "spennvidde", "24 meter"),)
|
||||
assert anchors.pairs == (("garden-notes", "bedbredde", "24 meter"),)
|
||||
|
||||
questions.write_text(json.dumps(payload) + " ", encoding="utf-8")
|
||||
with pytest.raises(gate.GateUsage, match="is not the file"):
|
||||
|
|
@ -250,16 +250,20 @@ def test_row_twos_denominator_is_the_sets_and_not_what_the_surface_reached(
|
|||
import hashlib
|
||||
|
||||
bundles = gate.corpus(scratch / "base")
|
||||
# The second reachable pair is the fixture's own second triple, read rather
|
||||
# than restated, so the test and the corpus cannot drift apart.
|
||||
second_bundle, second_anchor, second_quote = gate.SYNTHETIC_ANCHORS[1]
|
||||
assert second_bundle == "garden-notes"
|
||||
questions = scratch / "sporsmal.json"
|
||||
questions.write_text(
|
||||
json.dumps(
|
||||
{
|
||||
"sporsmal": [
|
||||
{
|
||||
"bundles": ["bridge-notes"],
|
||||
"bundles": ["garden-notes"],
|
||||
"atomer": [
|
||||
{"kilde_anker": "spennvidde", "kilde_sitat": "spennvidde 24 meter"},
|
||||
{"kilde_anker": "rekkverk", "kilde_sitat": "1,2 meter hoeyt"},
|
||||
{"kilde_anker": "bedbredde", "kilde_sitat": "bedbredde 24 meter"},
|
||||
{"kilde_anker": second_anchor, "kilde_sitat": second_quote},
|
||||
{
|
||||
"kilde_anker": "finnes-ikke",
|
||||
"kilde_sitat": "dette staar ingen steder",
|
||||
|
|
@ -288,7 +292,7 @@ def test_row_twos_denominator_is_the_sets_and_not_what_the_surface_reached(
|
|||
for row in gate.evaluate(
|
||||
scratch / "run",
|
||||
anchors=anchors,
|
||||
real={"bridge-notes": bundles["bridge-notes"]},
|
||||
real={"garden-notes": bundles["garden-notes"]},
|
||||
)
|
||||
}
|
||||
row = rows[2]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue