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
|
|
@ -5,7 +5,7 @@ concept. Used by `index.md` generators, search snippets, and previews." The
|
|||
spec sets NO length limit, in SS 4.1, SS 8 or SS 11. The limit here is this
|
||||
package's own and it is structural: the FIRST `<p>` of the FIRST direct-child
|
||||
`<sec sec-type="spec">` of a titled `<sec>`, whole. Measured on the one STS
|
||||
document this row has: 2 026 of 2 761 titled sections carry such a point.
|
||||
document this row has: 2 026 of its N titled sections carry such a point.
|
||||
|
||||
WHAT THESE TESTS PIN:
|
||||
|
||||
|
|
@ -38,13 +38,13 @@ from llm_ingestion_okf.segmentation import parse_segmentation_plan
|
|||
FIXTURES = Path(__file__).parent / "fixtures"
|
||||
IDENTITY = FIXTURES / "sts-identity.xml"
|
||||
|
||||
FIRST = "Omfatter utskifting av skadde enkeltkomponenter i gelender."
|
||||
SECOND = "Omfatter maling av gelender."
|
||||
FIRST = "Omfatter utskifting av skadde enkeltdeler i kjokkenbenk."
|
||||
SECOND = "Omfatter maling av kjokkenbenk."
|
||||
EXPECTED = {
|
||||
"Gelender": None,
|
||||
"Utskifting av enkeltkomponenter": FIRST,
|
||||
"Utskifting av handlist": None,
|
||||
"Maling av gelender": SECOND,
|
||||
"Kjokkenbenk": None,
|
||||
"Utskifting av enkeltdeler": FIRST,
|
||||
"Utskifting av handtak": None,
|
||||
"Maling av kjokkenbenk": SECOND,
|
||||
}
|
||||
STAMP = "2026-09-08T12:00:00Z"
|
||||
|
||||
|
|
@ -77,10 +77,10 @@ def test_each_titled_section_carries_its_own_first_spec_paragraph() -> None:
|
|||
marks = extract.xml_outline(IDENTITY.name, IDENTITY.read_bytes())
|
||||
|
||||
assert [(mark.title, mark.description) for mark in marks] == [
|
||||
("88 Gelender", None),
|
||||
("88.612 Utskifting av enkeltkomponenter", FIRST),
|
||||
("88.6121 Utskifting av handlist", None),
|
||||
("88.613 Maling av gelender", SECOND),
|
||||
("17 Kjokkenbenk", None),
|
||||
("17.612 Utskifting av enkeltdeler", FIRST),
|
||||
("17.6121 Utskifting av handtak", None),
|
||||
("17.613 Maling av kjokkenbenk", SECOND),
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -118,13 +118,13 @@ def test_a_spec_point_a_yaml_reader_could_not_read_verbatim_is_not_written(
|
|||
"""
|
||||
data = (
|
||||
IDENTITY.read_bytes()
|
||||
.replace(b"Omfatter maling av gelender.", b"Omfatter maling: gelender og gjerder.")
|
||||
.replace(b"Omfatter maling av kjokkenbenk.", b"Omfatter maling: kjokkenbenk og skap.")
|
||||
.replace(b"Omfatter utskifting av skadde", b"Omfatter 1:2 utskifting av skadde")
|
||||
)
|
||||
concepts = _by_title(_build(tmp_path, IDENTITY.name, data))
|
||||
|
||||
assert "description" not in concepts["Maling av gelender"]
|
||||
assert concepts["Utskifting av enkeltkomponenter"]["description"] == FIRST.replace(
|
||||
assert "description" not in concepts["Maling av kjokkenbenk"]
|
||||
assert concepts["Utskifting av enkeltdeler"]["description"] == FIRST.replace(
|
||||
"Omfatter utskifting", "Omfatter 1:2 utskifting"
|
||||
)
|
||||
|
||||
|
|
@ -208,8 +208,8 @@ def test_a_description_the_gate_refuses_is_dropped_and_the_concept_is_kept(
|
|||
|
||||
concepts = _door(tmp_path, gate)
|
||||
|
||||
assert "description" not in concepts["Utskifting av enkeltkomponenter"]
|
||||
assert concepts["Maling av gelender"]["description"] == SECOND
|
||||
assert "description" not in concepts["Utskifting av enkeltdeler"]
|
||||
assert concepts["Maling av kjokkenbenk"]["description"] == SECOND
|
||||
|
||||
|
||||
def test_the_description_written_is_the_gates_sanitized_text(tmp_path: Path) -> None:
|
||||
|
|
@ -218,6 +218,6 @@ def test_the_description_written_is_the_gates_sanitized_text(tmp_path: Path) ->
|
|||
|
||||
concepts = _door(tmp_path, gate)
|
||||
|
||||
assert concepts["Utskifting av enkeltkomponenter"]["description"] == FIRST.replace(
|
||||
assert concepts["Utskifting av enkeltdeler"]["description"] == FIRST.replace(
|
||||
"skadde", "[fjernet]"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue