简体   繁体   English

如何禁用nosetest插件

[英]how to disable a nosetest plugin

I don't want a coverage report so I uninstalled 'pip uninstall coverage' plugin. 我不想要覆盖报告,所以我卸载了'pip uninstall coverage'插件。 However I still get an error saying: 但是我仍然得到一个错误说:

nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module

How do I disable the calling of this plugin, or any other plugin for that matter. 如何禁用此插件或任何其他插件的调用。 Is there a list of enabled plugins that I can edit, or some api I can call to disable it? 是否有我可以编辑的已启用插件列表,或者我可以调用哪些API来禁用它?

Thanks. 谢谢。

Check your ~/.noserc file, it is likely, you have there entries related to uninstalled plugin. 检查你的~/.noserc文件,你可能有与卸载的插件有关的条目。

I am able to reproduce your problem if I have in the ~/.noserc : 如果我在~/.noserc中,我能够重现你的问题:

[nosetests]
with-coverage=1

but it happens also, if I have there 但如果我在那里,它也会发生

[nosetests]
with-coverage=0

If I remove it, the problem is resolved. 如果我删除它,问题就解决了。

The file can be also located in your working directory. 该文件也可以位于您的工作目录中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM