# Test fixtures ## The PDF fixtures `two-line-krav.pdf` and `no-text-layer.pdf` are hand-written minimal PDFs, regenerated by `make_fixtures.py` in this directory: ``` python3 tests/fixtures/make_fixtures.py ``` They carry no library's output — the objects are laid out by hand and the xref offsets computed from the emitted bytes — so they are auditable byte for byte and reproducible from that one file. | Fixture | What it is for | |---|---| | `two-line-krav.pdf` | One heading plus one requirement row with label and value on the **same line**. That pairing is the property `pdfplumber` was chosen for. | | `no-text-layer.pdf` | A structurally valid page with no text operators — the shape a scanned or image-only PDF presents. Must fail fast (`extractor_empty_pdf`), never persist as an empty concept. | | `outline-collision.pdf` | **Two bookmarks whose destinations resolve to the same line** — the tree's root node and a front-matter node, both on line 0, which is the shape R761 carries. The marks are collected in a dict keyed on the line index, so without this fixture the second node is dropped with nothing counting it: 2 763 nodes in, 2 762 marks out, `unresolved` at 0. A one-bookmark-per-line fixture cannot see that. | | `three-page-krav.pdf` | Three pages, one line of text each, and **the middle page carries no text operators**. The extractor drops empty pages, so the last page's text belongs to page 3 — which is what separates a page NUMBER from a count of the pages that produced text. Two pages could not tell those apart. | ## The XML fixtures Hand-written text, directly in this directory — **not** through `make_fixtures.py`, which builds binary containers, and never serialised by `ElementTree`. The reason is the same one the OOXML policy states: a library that writes and then reads its own format proves only that it agrees with itself, and an `ElementTree`-written fixture would stay green through any round-trip-symmetric defect. | Fixture | What it is for | |---|---| | `sts-mini.xml` | The known-positive. A `` root with `` at three nesting levels carrying `