[TIP] Getting Weird Coverage Reports

John Anderson sontek at gmail.com
Fri Nov 25 04:27:59 PST 2011


>
> Hi John,
>
> This is a similar problem that the Pecan [0] 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...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20111125/e1799864/attachment.htm>


More information about the testing-in-python mailing list