Skip to content

Examples

Four example suites live under examples/, each with its JSON, Markdown, and HTML output committed. Each report below is the committed HTML, served from this site. The committed Markdown reports are on GitHub: coffeeshop, hotel-booking, file-glossary-booking and self-report. The Markdown report page explains how to read them.

  • coffeeshop/test_coffeeshop.py · report — the core surface: nested step blocks, @given fixtures with teardown, text and JSON attachments, t-string interpolation, given annotations (Annotated[..., given(...)]), step-recording helpers, parametrize tables with custom case IDs, formatted step text, and failure, skip and expected-failure rendering.
  • hotel-booking/test_hotel_booking.py · report — Domain Storytelling over a code-defined Glossary: single- and multi-clause sentence(...) rows, scenarios bound to them with per-sentence coverage, and kindless + undefined terms awaiting classification.
  • file-glossary-booking/test_file_glossary_booking.py · report — the same over a Markdown FileGlossary: name-based term access, kinds inferred from clause slots, one deliberately kindless term.
  • self-report/ · report — pytest-given applied to its own backend suite, narrated in the vocabulary of GLOSSARY.md (loaded as a FileGlossary) and generated from the whole suite rather than a hand-written test file.

One more folder holds no report: pytest-bdd/ writes the quick start's coffee scenario with pytest-bdd, a Gherkin feature file plus step definitions. The BDD page walks through it and compares the two approaches and their reports.