pytest运行方式


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

 

 

部分方法运行

 

 

 详细信息显示

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM