Hello! On Fri, Apr 17, 2009 at 01:30:00PM -0700, kochhar wrote: > I'm trying to get statement-level code coverage numbers for my pylons > app while running tests outside of nose (user, integration and load > tests). I've tried using python-coverage and figleaf without success. > Neither tool seems to be able to track statements within my > application. python-coverage tells me that 0% of the lines in my app > were executed while figleaf only provides coverage numbers for the > standard library and Pylons library code. > > I ran coverage (from within my virtualenv) as: > $ source bin/activate > $ python bin/coverage.py -x bin/paster serve --reload development.ini
bin/paster serve --reload spawns a subprocess. Python's coverage tools have no way of tracing code executed in a subprocess. Try bin/paster serve without --reload. > If anyone has had more success, I'd appreciate a pointer to an example > or perhaps a discussion of how to get it to work in pylons. I have a > feeling that I'll need to write some scaffolding to instantiate my app > and run it without using paster, similar to how the functional tests > are run. Marius Gedminas -- Seen on a button at an SF Convention: Veteran of the Bermuda Triangle Expeditionary Force. 1990-1951.
signature.asc
Description: Digital signature
