#20392: Rearrange transactional behavior in django.test.TestCase: savepoints
around
tests
-----------------------------------+-----------------------------------
Reporter: xelnor | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords: test atomic savepoint
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+-----------------------------------
Leveraging aaugustin's work on `atomic()`, this patch modifies the
behavior of `django.test.TestCase`:
* A transaction is opened during `setUpClass` (one atomic per database)
* That transaction is closed during `tearDownClass`
* The database connection is no longer closed after each test function
This allows to create objects and complex state in `setUpClass`, and reuse
it through all test functions,
without inter-test conflicts.
This could lead to a single load of fixtures during `setUpClass` (instead
of the current `setUp`), thus improving test speed.
--
Ticket URL: <https://code.djangoproject.com/ticket/20392>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.