cmc-csci046 icon indicating copy to clipboard operation
cmc-csci046 copied to clipboard

ModuleNotFoundError when running pytest command

Open milesba4 opened this issue 2 years ago • 1 comments
trafficstars

Hello Mike,

When I run the command $python3 -m pytest, I get the error: ModuleNotFoundError: No module named 'sorting'. My python file is named sorting.py, so im not sure what's causing the issue.

milesba4 avatar Feb 26 '23 01:02 milesba4

I am getting this same error for the Hypothesis module in the testing file. I tried to use Vim to install Hypothesis both in the test_main file and in the sorting directory, but am still getting the ModuleNotFoundError when running Pytest. My only suggestion would to be sure you're running the $ python3 -m pytest command from the right working directory.

npcrites avatar Feb 27 '23 15:02 npcrites