[TIP] Problems getting coverage of a TurboGears application

Richard Jones r1chardj0n3s at gmail.com
Wed Mar 16 22:42:03 PDT 2011


Hi all,

I have a TurboGears (1.1b3) application which has a bunch of code in a
package that implements all the controller stuff.

I have a bunch of tests that I execute with nosetests (yay nosetests!)
using stdlib unittest.TestCase to organise them ('cos I roll it old
school like that). The tests execute the code in the package directly
- not through any TurboGears/cherrypy publishing, fake or otherwise.

When I ask nosetests for coverage (--with-coverage) the modules in my
package are listed, but they're always listed with 0% coverage.

I've attempted to run the tests manually under coverage.py and when I
do so the report doesn't list my package's modules at all!

I use nose + coverage in a bunch of my other applications and it works
fine there, it's just this one TurboGears application that's not
working.

Does anyone have any hints for where I might even start looking to fix
this problem?


     Richard



More information about the testing-in-python mailing list