main: fix only one doctest collected on pytest --doctest-modules __init__.py
When --doctest-modules is used, an `__init__.py` file is not a `Package` but a `DoctestModule`, but some collection code assumed that `__init__.py` implies a `Package`. That code caused only a single test to be collected in the scenario in the subject. Tighten up this check to explicitly check for `Package`. There are better solutions, but for another time. Report & test by Nick Gates <nickgatzgates@gmail.com>.
This commit is contained in:
1
changelog/8016.bugfix.rst
Normal file
1
changelog/8016.bugfix.rst
Normal file
@@ -0,0 +1 @@
|
||||
Fixed only one doctest being collected when using ``pytest --doctest-modules path/to/an/__init__.py``.
|
||||
Reference in New Issue
Block a user