Skip to content

3.2.0

Latest

Choose a tag to compare

@Cito Cito released this 12 Jun 21:34
bcb7119

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-in describe_docstrings configuration option, describe-blocks are reported under the first line of their docstring instead of their function name, allowing for more descriptive test reports like test_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 function get_describe_functions returns 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!