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
|
|
@ -500,7 +500,7 @@ def test_office_conversion_warns_that_it_is_lossy(
|
|||
# (pdfplumber pins pdfminer.six==20260107 exactly; pdfminer.six ships
|
||||
# date-stamped releases with no stability contract). This literal is what makes
|
||||
# a parser upgrade break something visible instead of drifting silently.
|
||||
KRAV_TEXT = "Krav til helning på utkilingen\n60 og 70 1:15"
|
||||
KRAV_TEXT = "Krav til hevetid på deigkulene\n60 og 70 1:15"
|
||||
|
||||
# The office fixtures are frozen the same way, and against a NAMED converter
|
||||
# version -- a frozen literal means nothing without one, because the thing it
|
||||
|
|
@ -513,7 +513,7 @@ requires_pandoc = pytest.mark.skipif(
|
|||
|
||||
# docx: a heading and one requirement row with label and value on the SAME
|
||||
# line, mirroring the property the PDF fixture pins.
|
||||
DOCX_TEXT = "# Krav til helning\n\n60 og 70 1:15"
|
||||
DOCX_TEXT = "# Krav til hevetid\n\n60 og 70 1:15"
|
||||
|
||||
# xlsx: the sheet name becomes a heading and the rows become a table. The
|
||||
# label/value pairing survives on one row, which is the property that matters.
|
||||
|
|
@ -522,11 +522,11 @@ DOCX_TEXT = "# Krav til helning\n\n60 og 70 1:15"
|
|||
# `docs/2026-09-08-prisform-og-loggen-k2.md`: the spreadsheet row now writes
|
||||
# pipe tables, so the cells arrive delimited instead of padded. Every character
|
||||
# of content is the same; only the table form changed.
|
||||
XLSX_TEXT = "## Krav {#sheet-1}\n\n| Krav til helning | |\n|----|----|\n| 60 og 70 | 1:15 |"
|
||||
XLSX_TEXT = "## Krav {#sheet-1}\n\n| Krav til hevetid | |\n|----|----|\n| 60 og 70 | 1:15 |"
|
||||
|
||||
# The negative control, committed rather than described: the SAME document
|
||||
# without `word/styles.xml`. The body survives and the heading marker does not.
|
||||
DOCX_NO_STYLES_TEXT = "Krav til helning\n\n60 og 70 1:15"
|
||||
DOCX_NO_STYLES_TEXT = "Krav til hevetid\n\n60 og 70 1:15"
|
||||
|
||||
|
||||
@requires_pandoc
|
||||
|
|
@ -767,13 +767,13 @@ def test_a_single_column_sheet_gains_no_columns() -> None:
|
|||
# A red here means the writer stopped being scoped -- read the diff and decide.
|
||||
OFFICE_TEXT_DIGESTS = {
|
||||
"k2-office/krav-tekstdokument.odt": (
|
||||
"58c9776f0d7f2b2a3a9d2774e4ae243b265c31b5b6b96914ef4db419fa66e4e2"
|
||||
"581d43835416721157f662d5403a621277718f9841d167331c5ee274e59548d7"
|
||||
),
|
||||
"k2-office/krav-presentasjon.pptx": (
|
||||
"752420a04d651a416938ff9f0b3c2de5849bd2ea1d52063dd88aaae65ab99b90"
|
||||
"c6fc68dcdb0e28522249f3988e2350a2932c891d0f6361fa4dbf139148f0dede"
|
||||
),
|
||||
"k2-office/krav-rikt-tekstformat.rtf": (
|
||||
"79cbf756eb482bb603f82c171d11efe74b9ba62ab9ef679ecd6bb8c3b3740ffb"
|
||||
"89222009cae6587b71e261ca029c2e01fa7f1736d04fbc1ad4cb54ae8f851fd0"
|
||||
),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue