报告覆盖范围内未测试的 python 文件
我正在为现有项目编写测试用例,并且要测试多个Python文件,即使该文件没有测试柜,我也想知道项目目录下所有文件的覆盖范围报告。 我运行以下命令
时
当 未显示另一个尚未测试的文件。
我已经尝试使用以下命令以及覆盖范围运行-source =。 -m pytest测试/& amp;覆盖范围报告-M
任何人都可以帮助您的可能性吗?
I am writting the test cases for an existing project and there are multiple python files to be tested, I would like to know the coverage report for all the files under project directory even though there is no testcases wrritten for this file. When I run the below command
pytest --cache-clear --cov-report term-missing --cov=services/ tests/
Report only shows the file which has the test cases under tests/ directory but not showing the other yet to tested files.
I have tried with the below command as well coverage run --source=. -m pytest tests/ && coverage report -m
Can anyone please help how it is possible ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论