Skip to content

Commit 264e7ac

Browse files
committed
reference: add doc for Package
We document the other py collectors, we should document `Package` as well.
1 parent 2d82432 commit 264e7ac

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

doc/en/reference/reference.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,12 @@ Parser
926926
.. autoclass:: pytest.Parser()
927927
:members:
928928

929+
Package
930+
~~~~~~~
931+
932+
.. autoclass:: pytest.Package()
933+
:members:
934+
929935
OptionGroup
930936
~~~~~~~~~~~
931937

src/_pytest/python.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,9 @@ def _importtestmodule(self):
659659

660660

661661
class Package(Module):
662+
"""Collector for files and directories in a Python packages -- directories
663+
with an `__init__.py` file."""
664+
662665
def __init__(
663666
self,
664667
fspath: Optional[LEGACY_PATH],

0 commit comments

Comments
 (0)