ModuleNotFoundError: No module named ‘pytest‘

Running the program in pycharm reported an error, ModuleNotFoundError: No module named 'pytest'
searched, it turned out to be a naming problem, the py file was named test_xxx.py, the file that should start with test_ will call the pytest module to start, and then the file lacks some statement or parameter.
Solution:
Change the file name to test1_xx.py to run normally.

**INSERT PICTURE DESCRIPTION HERE**

Guess you like

Origin blog.csdn.net/chenfang0529/article/details/123820749