Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
reference: add doc for Package
We document the other py collectors, we should document `Package` as
well.
  • Loading branch information
bluetech committed Jun 14, 2023
commit 264e7ac32733572fad3892ba0e830dba7cc87cf0
6 changes: 6 additions & 0 deletions doc/en/reference/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,12 @@ Parser
.. autoclass:: pytest.Parser()
:members:

Package
~~~~~~~

.. autoclass:: pytest.Package()
:members:

OptionGroup
~~~~~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions src/_pytest/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,9 @@ def _importtestmodule(self):


class Package(Module):
"""Collector for files and directories in a Python packages -- directories
with an `__init__.py` file."""

def __init__(
self,
fspath: Optional[LEGACY_PATH],
Expand Down