[TIP] After upgrade to coverage 3.0.1, nosetests --with-coverage shows zero lines covered!
Doug Latornell
doug at sadahome.ca
Thu Jul 16 09:45:08 PDT 2009
Thanks for the suggestions, Ned. I confirmed that the problem exists in a
minimal TG 1.0.5 project:
alec:coverage-test$ tg-admin quickstart spam
...
alec:coverage-test$ cd spam/
alec:spam$ nosetests --with-coverage --cover-package=spam --cover-erase
..
Name Stmts Exec Cover Missing
------------------------------------------------
spam 1 1 100%
spam.config 1 1 100%
spam.controllers 7 0 0% 1-13
spam.templates 1 1 100%
------------------------------------------------
TOTAL 10 3 30%
----------------------------------------------------------------------
Ran 2 tests in 1.492s
OK
alec:spam$ sudo easy_install "coverage==2.85"
...
alec:spam$ nosetests --with-coverage --cover-package=spam --cover-erase
..
Name Stmts Exec Cover Missing
------------------------------------------------
spam 0 0 100%
spam.config 0 0 100%
spam.controllers 7 7 100%
spam.templates 0 0 100%
------------------------------------------------
TOTAL 7 7 100%
----------------------------------------------------------------------
Ran 2 tests in 9.206s
OK
Next, I'll try your -L option suggestion, and the logging from tip.
Re: -L is there a way to pass a switch to coverage through the nose
plug-in? AFAIK, the TG quickstart project template relies on nose for test
discovery. The test module has nothing like a unittest.main() interface.
Doug
On Wed, Jul 15, 2009 at 6:34 PM, Ned Batchelder <ned at nedbatchelder.com>wrote:
> Doug, thanks for reporting this. If you don't get a toy TG project
> working, here are two things to try:
>
...
>
> --Ned.
> http://nedbatchelder.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.idyll.org/pipermail/testing-in-python/attachments/20090716/3ea5107e/attachment.htm
More information about the testing-in-python
mailing list