Fixture loading should be skipped for TestCase decorated with @skip*
TransactionTestCase overrides unittest.TestCase.__call__() and always runs _fixture_setup(), even for skipped tests (decorated with @skip* from unittest).
It makes no sense at all and it's really waste of time to wait for those fixtures to load.
"""Performs any pre-test setup. This includes:
* Flushing the database.
* If the Test Case class has a 'fixtures' member, installing the
* If the Test Case class has a 'urls' member, replace the
ROOT_URLCONF with it.
* Clearing the mail test outbox.
mail.outbox = 
def __call__(self, result=None):
Wrapper around default __call__ method to perform common Django test
set up. This means that user-defined Test Cases aren't required to
include a call to super().setUp().
self.client = Client()
self._pre_setup() # LOAD FOR EVERY TestCase
except (KeyboardInterrupt, SystemExit):
super(TransactionTestCase, self).__call__(result) # HERE @skip* decorators are honoured
Change History (10)
changed from nobody to Paul McMillan