pytest内容

pytest内容
查看进程ps ax | grep python
覆盖率:
1、pytest –cov –cov-report=html -s -v
2、coverage run –source=. -m pytest
只想运行一个模块
coverage run –source=. -m pytest UT/test_HttpService
不想统计某一个模块–omit
coverage run –source=. –omit=/UT -m pytest
coverage run –source=. –omit= /UT -m pytest
(忘记带不带星了)

看报告
coverage report -i
出目录
coverage html -d 指定目录

每个case是否错误:pytest –html=report.html

Original: https://blog.csdn.net/xiongyanglai/article/details/125987583
Author: xiongyanglai
Title: pytest内容

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/775058/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球