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

meme dough memedough at gmail.com
Sun Jun 12 19:19:59 PDT 2011


Somewhat a shameless plug, but you could also try nose-cov which makes
use of coverage's html / xml reports and also some of the newer
coverage features like source roots.

On 9 June 2011 23:00, Ned Batchelder <ned at nedbatchelder.com> wrote:
> 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.
>
> --Ned.
>
> 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 1.0.5.1,
> 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
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
>



More information about the testing-in-python mailing list