Version 3.2.0 of the pytest-describe plugin
This version supports pytest 7.0 to 9.0 on Python 3.10 to 3.14.
New features:
-
Fixtures as describe block arguments (#54):
When several tests in a describe-block need the same fixture, you can now pass the fixture name as an argument to the describe function instead of repeating it in every test. See the README for details and caveats. -
Docstrings as describe block names (#41, #55):
With the new opt-indescribe_docstringsconfiguration option, describe-blocks are reported under the first line of their docstring instead of their function name, allowing for more descriptive test reports liketest_wallet.py::a wallet::when it is empty::it_has_no_balance. See the README for how to enable it. -
Access to describe functions for plugins (#53, #55):
The new public functionget_describe_functionsreturns the describe functions wrapping a collected test item, so that reporting plugins can show describe block names or docstrings in their output. See the README for a usage example. -
The package now ships with complete type hints, verified with mypy in strict mode.
Breaking changes:
- Support for Python 3.9 and pytest 6 has been dropped.
Thanks to everyone who contributed to this release with ideas and feedback!