命令行中 python 是解释器执行程序,也即 python.exe
pytest 是个 python 脚本或预编译模块,通常是不可执行的;除非有 Shebang
而 -m pytest 是指在命令行 python test_name_function.py 执行时载入模块 pytest
【 在 shouge111 的大作中提到: 】
: 在vscode终端,测试时,
: 输入这个可以:python -m pytest test_name_function.py;
: 但是这个不行:pytest test_name_function.py。为什么?
: ...................
--
修改:easior FROM 117.143.147.*
FROM 117.143.147.*