[TIP] Problems getting coverage of a TurboGears application
ned at nedbatchelder.com
Thu Mar 17 06:41:52 PDT 2011
This is almost exactly the case the --timid flag was designed for. For
running under nose, make sure you have coverage.py >= 3.3, and create a
timid = True
It will go slower, but it should measure properly.
On 3/17/2011 7:05 AM, Christoph Zwerschke wrote:
> Am 17.03.2011 06:42 schrieb Richard Jones:
> > I have a TurboGears (1.1b3) application which has a bunch of code in a
> > package that implements all the controller stuff.
> I wonder why you're still using a beta version of 1.1. 1.1 final and
> 1.1.2 bugfix versions are available and should be fully compatible.
> > When I ask nosetests for coverage (--with-coverage) the modules in my
> > package are listed, but they're always listed with 0% coverage.
> > Does anyone have any hints for where I might even start looking to fix
> > this problem?
> This has to do with conflicts between PEAK-Rules and coverage caused
> by their use of sys.settrace. Some things you should try:
> - Use coverage with the "--timid" option
> or set timid=True in .coveragerc to activate
> this option with the nose coverage plugin
> - Use Python >= 2.6 because of
> - Update to TurboGears 1.1.2 and the latest PEAK-Rules
> -- Christoph
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
More information about the testing-in-python