pytest有几种运行方式
1.全量方式运行
pytest 测试py文件
2.部分方法运行
pytest test_mod.py::test_func
3.运行时显示详细日志
pytest test_mod.py::test_func -v -s
案例展示
全量方式运行
def test_demo1():
print("run demo1------------")
assert True
def test_demo2():
print("run demo2-----------")
assert True

部分方法运行

详细信息显示

