缺少“代码覆盖率" Python项目上的标签 [英] Missing "Code Coverage" tab on Python project

查看:107
本文介绍了缺少“代码覆盖率" Python项目上的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 GitHub 上托管了一个Python项目,我使用 Azure管道(这是

I have a Python project hosted on GitHub, which I test using Azure Pipelines (here is a link to the configuration).

我正在使用pytest运行单元测试,并获得覆盖率结果,并将结果上传到管道中.我在管道执行摘要中获得了总体代码覆盖率百分比(示例),但是我看不到代码覆盖率"标签,其中包含涉及哪些行的详细信息.构建工件包含HTML代码覆盖率报告,其中包含此信息,但是最好在管道运行页面本身中查看它.

I am running unit tests with pytest and get coverage results, which I upload in my pipeline. I get an overall code coverage percentage in the pipeline execution summary (example), but I don't see a "Code Coverage" tab that contains the details of which lines are covered. The build artifacts contain the HTML code coverage report, which contains this information, but it'd be nicer to see it in the pipeline run page itself.

这是pytest的调用:

Here is the invocation of pytest:

pytest tests --doctest-modules --junitxml=junit/test-results.xml 
    --cov=callgraph --cov-report=xml --cov-report=html

我想念什么?

推荐答案

不能那样工作.至少六个月前就是这种情况.

that doesnt work like that, unfortunately. at least that was the case 6 months ago.

https://github.com/Microsoft/azure-pipelines-tasks/issues/7703

这篇关于缺少“代码覆盖率" Python项目上的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆