Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bluetech
Copy link
Member

Fixes #8016. Closes #8015.

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 @gatesn.

…it__.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 <[email protected]>.
@bluetech bluetech merged commit 66311ff into pytest-dev:master Nov 13, 2020
@bluetech bluetech deleted the doctest-init branch November 14, 2020 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doctest collection only returns single test for __init__.py
2 participants