Skip to content

A conftest implementing every hook

What actually happens when a conftest.py implements all 52 declared hooks.

The conftest.py here is generated: it implements every hook pytest declares.

Deprecated hooks are implemented too, which pytest would normally refuse - the run suppresses its own removal warnings so that the conftest really does cover everything the version declares.

This is the scenario that shows which hooks a conftest.py can and cannot serve. Some hooks have already fired by the time a conftest is imported, so implementing them there does nothing at all - the implementation is registered, and never called.

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