[TIP] FW: Nose run doesn not generate *cover files, so HTML generation fails

Ned Batchelder ned at nedbatchelder.com
Thu Jun 9 06:00:31 PDT 2011

Miriam, thanks so much for patching this, it's been a long-standing 
issue.  Could you post it to the nose users list 
(nose-users at googlegroups.com), that's the best way to get it into the 
official release.


On 6/9/2011 8:07 AM, Goldenberg, Miriam wrote:
> Hi,
> We've found how to fix this problem: please find attached the file 
> *cover.py* (from <*/nose-root>/nose/plugins/* and 
> */<nose-root>/build/lib/nose/plugins/*), where a generation of the 
> coverage HTML report by "nose" just commented and replaced by a call 
> to the *coverage.html_report(...) *method. This solved the problem. 
> So, could you please include this patch into a next official release 
> of the "nose"?
> Regards,
> Miriam
> *From:*Goldenberg, Miriam
> *Sent:* Monday, June 06, 2011 6:24 PM
> *To:* 'testing-in-python-request at lists.idyll.org'
> *Subject:* Nose run doesn not generate *cover files, so HTML 
> generation fails
> confirm 8e0434042d71cd815dd36b8cea43e1548bca844f
> Hi,
> When I run Nose unit tests with the coverage arguments: 
> "---with-coverage, --cover-erase, --cover-package,[...], 
> --cover-inclusive, --cover-html", I have the following problem: if I 
> specify a package name:  --cover-package,['*mypackage*'], then *cover 
> files are not generated and this causes the HTML generation step to fail.
> But if I specify *any* file name (existing in the project): 
>  --cover-package,['*myfile.py*'], then Nose finds *all* unit tests in 
> the project, generates all *cover files and the HTML report as well. 
> The specified file ('*myfile.py*') could be chosen from any project 
> package -- anyway all tests run and report successfully.
> Could you please advice? I use Python 2.7, Nose 0.1.11, PyMock 
>, Coverage 3.4.win32-py2.7.
> Thank you,
> Miriam
> ------------------------------------------------------------------------
> This message is confidential and intended only for the addressee. If 
> you have received this message in error, please immediately notify the 
> postmaster at nds.com and delete it from your system as well as any 
> copies. The content of e-mails as well as traffic data may be 
> monitored by NDS for employment and security purposes.
> To protect the environment please do not print this e-mail unless 
> necessary.
> An NDS Group Limited company. www.nds.com
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20110609/21cf0022/attachment.htm>

More information about the testing-in-python mailing list