Closed
Description
I'm using Python 3.6 and pytest 3.0.6, on Windows and Linux.
I have noticed a strange issue. Here is a test project which I used to reproduce the problem: https://github.com/mloskot/python-package/
-
Go to root folder of the project
-
Run
pytest
command and observe the error (see failing Travis CI build 1):
E ModuleNotFoundError: No module named 'pets'
- Run
python -m pytest
command and observe successful run, with all modules under test being found (see Travis CI build 2)
AFAIK, both commands are equivalent.
The only bug report related to ModuleNotFoundError
and Python 3.6 I found is #2132 but I'm not sure if this is related in any way.