-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: change
Package
to no longer be a Module
/File
Fix #11137.
- Loading branch information
Showing
6 changed files
with
145 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:class:`pytest.Package` is no longer a :class:`pytest.Module` or :class:`pytest.File`. | ||
|
||
The ``Package`` collector node designates a Python package, that is, a directory with an `__init__.py` file. | ||
Previously ``Package`` was a subtype of ``pytest.Module`` (which represents a single Python module), | ||
the module being the `__init__.py` file. | ||
This has been deemed a design mistake (see :issue:`11137` and :issue:`7777` for details). | ||
|
||
The ``path`` property of ``Package`` nodes now points to the package directory instead of the ``__init__.py`` file. | ||
|
||
Note that a ``Module`` node for ``__init__.py`` (which is not a ``Package``) may still exist, | ||
if it is picked up during collection (e.g. if you configured :confval:`python_files` to include ``__init__.py`` files). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.