Skip to content

v0.13.0 — block-designed summary: plugins own the whole layout

Choose a tag to compare

@prostomarkeloff prostomarkeloff released this 14 Jul 16:35
· 21 commits to main since this release
55d6f80

The summary is yours

The summary box is now rendered as a list of named blocks — top, results, warmup, run, par, [detailed], bus, [failures], [xpass], [durations (full-report) | slowest (lean)], bottom — and daemon plugins (PYTEST_FAST_DAEMON_PLUGINS) get full control over it:

  • pytest_fast_run_completed(run_info) — the additive hook, unchanged: returned lines become a plugin:<mod> block placed right after the stats block.
  • pytest_fast_render_summary(run_info, blocks) — new, full control: receives every named block of the default render (plus earlier plugin:* blocks) and returns the new layout — reorder, drop, rewrite, inject. Returning None keeps the (possibly mutated in place) list. Plugins run in env-list order as a pipeline.

SummaryBlock (TypedDict) is exported for typing. Failure policy extends to the new hook: a raising plugin or a malformed render return degrades to a visible ⚠ line in a plugin-errors block — never a crashed daemon, never a silently-missing gate, and the default layout survives.

Default output is byte-identical when no plugins are configured.

Verification

Layout hook e2e (retitle / reorder / drop blocks), malformed-return degradation, updated seam & degradation tests. Gates: make lint-heavy, make test-full (106 passed), make test-stress (107 passed).