Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/13216.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarified that ``package``-scoped fixtures use pytest package collection boundaries, which by default require an ``__init__.py`` file.
4 changes: 3 additions & 1 deletion doc/en/how-to/fixtures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,9 @@ Fixtures are created when first requested by a test, and are destroyed based on
* ``function``: the default scope, the fixture is destroyed at the end of the test.
* ``class``: the fixture is destroyed during teardown of the last test in the class.
* ``module``: the fixture is destroyed during teardown of the last test in the module.
* ``package``: the fixture is destroyed during teardown of the last test in the package where the fixture is defined, including sub-packages and sub-directories within it.
* ``package``: the fixture is destroyed during teardown of the last test in the
:term:`regular <python:regular package>` :ref:`Python package <python:tut-packages>` where the fixture is defined, including sub-packages and
sub-directories within it.
* ``session``: the fixture is destroyed at the end of the test session.

.. note::
Expand Down