test(fixtures): the STS fixtures and fixture codes are fictitious
Three STS fixtures still carried the section titles and labels of one real reference document, and three identifiers were copies of its codes with a letter or a word swapped. They now describe an invented kitchen counter and cookbook series: the titles, labels and descriptions of sts-identity.xml, sts-inherit.xml and sts-empty-label.xml, the P350/P351 document codes, the 99-0001 delivery prefix and chapter 7 of the image and accounting corpora. Generated fixtures are regenerated and the witness inventory's per-document totals are identical before and after; only names and text move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5359394a4f
commit
88cf67f12e
65 changed files with 396 additions and 390 deletions
|
|
@ -24,7 +24,7 @@ Three readers must agree on every value written, each for its own reason:
|
|||
MEASURED before any code moved (PyYAML 6.0.3): the K2 default bundle this
|
||||
repository pins fails `safe_load` on 41 of its 455 frontmatter blocks, every
|
||||
one a `title` (a leading `- `, `**` or `*`, a `": "`), and the reference-standard build on 1
|
||||
of 2 763 (a title ending in `:`). No `sources` value okf itself wrote failed.
|
||||
of a few thousand (a title ending in `:`). No `sources` value okf itself wrote failed.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
@ -97,7 +97,7 @@ def _concept(title: str, **overrides: object) -> str:
|
|||
#: Plain today and plain after: a colon with no space, a `#` with no space
|
||||
#: before it, `=`, `&`. Written byte-for-byte as before -- the known-negative
|
||||
#: that keeps the fix from quoting what never needed it.
|
||||
BLOCK_PLAIN = ["Q100:2023", "Kap#3", "P761 Oppskriftsboka:2025", "a=b&c", "1:2 utskifting"]
|
||||
BLOCK_PLAIN = ["Q100:2023", "Kap#3", "P350 Oppskriftsboka:2025", "a=b&c", "1:2 utskifting"]
|
||||
|
||||
#: Each is refused or MISREAD by PyYAML as a plain block scalar.
|
||||
BLOCK_NOT_PLAIN = [
|
||||
|
|
@ -147,7 +147,7 @@ def test_a_run_stated_description_with_a_colon_space_reads_back(tmp_path: Path)
|
|||
"""K3-19's 217: a DERIVED spec point carrying `": "` is still omitted
|
||||
(`test_sts_description.py`); a STATED one is the caller's words and is
|
||||
written in a form a YAML reader returns verbatim."""
|
||||
value = "Omfatter maling: gelender og gjerder."
|
||||
value = "Omfatter maling: kjokkenbenk og skap."
|
||||
text = _concept(
|
||||
"T", profile=SEGMENTED_OKF_V0_2, concept_frontmatter_values={"description": value}
|
||||
)
|
||||
|
|
@ -157,7 +157,7 @@ def test_a_run_stated_description_with_a_colon_space_reads_back(tmp_path: Path)
|
|||
# --- the `sources` flow mapping ---------------------------------------------
|
||||
|
||||
#: Written verbatim inside the flow mapping, and every reader agrees.
|
||||
FLOW_KEPT = ["Q100:2023", "P761 Oppskriftsboka 2025", "Kap#3", "a=b&c"]
|
||||
FLOW_KEPT = ["Q100:2023", "P350 Oppskriftsboka 2025", "Kap#3", "a=b&c"]
|
||||
|
||||
#: No form both PyYAML and the guard read: plain, PyYAML refuses or misreads
|
||||
#: it; quoted, the guard refuses it. Refused rather than written.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue