diff --git a/changelog/13216.doc.rst b/changelog/13216.doc.rst new file mode 100644 index 00000000000..18e3b3e6810 --- /dev/null +++ b/changelog/13216.doc.rst @@ -0,0 +1 @@ +Clarified that ``package``-scoped fixtures use pytest package collection boundaries, which by default require an ``__init__.py`` file. diff --git a/doc/en/how-to/fixtures.rst b/doc/en/how-to/fixtures.rst index 0ffc0778f9f..4d7ba3c0aa5 100644 --- a/doc/en/how-to/fixtures.rst +++ b/doc/en/how-to/fixtures.rst @@ -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 ` :ref:`Python package ` 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::