Skip to content

A run that dies during collection

What pytest does when a hook implementation raises.

The conftest.py here raises from pytest_collection_modifyitems. Nothing catches it, so pytest abandons the session and reports an internal error.

No test ever runs, so the whole run-test phase is missing from this diagram - which is the point. It shows how little of a session happens when a hook implementation fails early, and which hooks still get their chance to clean up.

Latest pytest - or pick a flow below.

Distinct flows

52 captured releases produce 8 distinct flows.

Flow Releases
pytest 8.1.1 - 9.1.1 20
pytest 8.0.0 - 8.0.2 3
pytest 7.3.2 - 7.4.4 6
pytest 7.1.0 - 7.3.1 9
pytest 7.0.0 - 7.0.1 2
pytest 6.2.0 - 6.2.5 6
pytest 6.1.0 - 6.1.2 3
pytest 6.0.0 - 6.0.2 3