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

Goldenberg, Miriam MGoldenberg at nds.com
Thu Jun 9 05:07:44 PDT 2011


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"?


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


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,

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20110609/049e04a6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cover.py
Type: application/octet-stream
Size: 12111 bytes
Desc: cover.py
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20110609/049e04a6/attachment-0001.obj>

More information about the testing-in-python mailing list