"使用pip安装的库不包括在测试覆盖范围内"

2024-05-12 22:03:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在一个模块上运行nosetests,该模块使用放置在Logs/Logger.py中的记录器类

Logger类使用fluentd logger library,该类与我的项目上的pip一起安装

问题是,NoTests正在将fluent test添加到覆盖率报告中,给出了我的应用程序覆盖率的错误总百分比

enter image description here

这是我的setup.cfg内容:

[pep8]
max-line-length = 9999

[nosetests]
verbosity=1
where=dbSync/Tests
ignore-files = (?:^\.|^_,|^__init__\.py$)

如何从安装了pip的库中排除覆盖率

多谢各位


Tags: 模块pip项目pytestlibrary覆盖率logger