Static vs variable test fixtures

4 views
Skip to first unread message

Simon Litchfield

unread,
Oct 13, 2008, 9:18:17 PM10/13/08
to Django developers
Reloading of fixtures for each test gets painful when the fixtures get
big.

Maybe we could continue to have TestCase.fixtures as a list of
'variable' fixtures that do definitely need to be reloaded for each
test... and add a new optional attribute, TestCase.static_fixtures,
which would be a list of fixtures that only need to be loaded at the
start of the TestCase.

I've run into this problem a few times now and this simple improvement
would make tests so much nicer :-)

Alex Koshelev

unread,
Oct 14, 2008, 2:40:35 AM10/14/08
to Django developers
After `testFOO` method call test case flushes all data in database. So
if you want to add some logic at this stage - flushing procedure may
take a lot of time and you will get no speed improvements.
Reply all
Reply to author
Forward
0 new messages