Open
Description
In #1567 it was men, user has spent a long time trying to figure out why their namespace package was not being found, reason being that pytest does not support namespace packages via --pyargs
(#478).
One easy suggestion is to improve the error message, from:
ERROR: module or package not found: module.misc (missing __init__.py?)
To something like this:
ERROR: pytest cannot import module or package 'module.misc'
Possible reasons:
- Missing an __init__.py file
- Namespace package (not supported)
- Not reachable via PYTHONPATH
See <link to docs> for more information.
Bonus points if we link to a documentation where we have an explanation for each bullet point above.
Originally posted by @nicoddemus in #1567 (comment)