[TIP] Getting Weird Coverage Reports
sontek at gmail.com
Fri Nov 25 04:27:59 PST 2011
> Hi John,
> This is a similar problem that the Pecan  framework had (still?) for
> exposing configuration setup for the actual application
> at test time.
> The problem is (as you suspect) that the configuration in pytest_configure
> happens *before* any of the mechanisms for coverage start.
> My suggestion would be not to use this and to try and have a base class
> that you can use for your tests that include this configuration and
> database setup.
The problem is I only want to run this once for *all* my tests, just to
start in a clean slate. I don't want to run it per sets of test. It
*does* work if I put it in setUpClass of my Base test class but it takes my
tests from 5sec to 30sec because its dropping and recreating the db for
each set of tests.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python