1
megachweng 2019-04-12 12:21:48 +08:00 via iPhone
好歹贴一下日志和代码呀
|
2
duzhonglin OP @megachweng 这是代码
import pytest def test_main(): assert 5!=5 if __name__ == "__main__": pytest.main() 下面是报错提示: [Running] python -u "d:\MyPytest\test_sample.py" Traceback (most recent call last): File "d:\MyPytest\test_sample.py", line 1, in <module> import pytest ModuleNotFoundError: No module named 'pytest' [Done] exited with code=1 in 0.185 seconds 在命令行是可以正常执行得 |