pytest gives ModuleNotFoundError #6791
Unanswered
SebastianJames55
asked this question in
Get help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was trying to fix #5688. I did the setup & recreated the issue by following the steps mentioned in the issue.
python -m pytest tests/
-> 17 errors initial errorI referred to the official pytest documentation & numerous answers to similar questions on stack overflow, none proved fruitful to solve the issue.
For example: I added init.py file in tests folder -> reduces to 1 error: ModuleNotFoundError Module not found error Initially I thought this error was an issue with my local setup & proceeded with the PR. The checks there caught the same error for a different file under tests folder (I'm guessing this is because the check is in Ubuntu; by the way my system is Windows).
This was the expected fix as mentioned by Patricio
I also tried several suggestions for adding the directory to Python search path, which didn't help. By the way, Python search path already had the path to the required file. Python search paths
I'm totally out of options to try. Any help is much appreciated, thank you.
Beta Was this translation helpful? Give feedback.
All reactions