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

 pytest运行方式

 

部分方法运行

 pytest运行方式

 

 详细信息显示

pytest运行方式

 

相关文章:

  • 2022-12-23
  • 2022-02-16
  • 2021-08-27
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
猜你喜欢
  • 2022-01-12
  • 2021-10-18
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
相关资源
相似解决方案