diff options
| author | Thomas Chaumeny <thomas.chaumeny@polyconseil.fr> | 2014-12-04 14:05:59 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-12-12 09:16:15 -0500 |
| commit | 119154ca7f65d423bb742aa0e32ffcfcb21d4b87 (patch) | |
| tree | 139d0431aeffca74686aea53c6dda99f9a26c460 /docs | |
| parent | 0dea81cd6d34b3e41cc4bbec99b5fdf06142b09e (diff) | |
Refs #20392 -- Load fixtures once within TestCase
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.8.txt | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index 5ab42996ab..f9eaf83148 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -67,6 +67,25 @@ to accept expressions other than aggregates. Aggregates are now able to reference multiple fields, as well as perform arithmetic, similar to ``F()`` objects. +``TestCase`` data setup +~~~~~~~~~~~~~~~~~~~~~~~ + +:class:`~django.test.TestCase` has been refactored to allow for data +initialization at the class level using transactions and savepoints. Database +backends which do not support transactions, like MySQL with the MyISAM storage +engine, will still be able to run these tests but won't benefit from the +improvements. Tests are now run within two nested +:func:`~django.db.transaction.atomic()` blocks: one for the whole class and one +for each test. + +* The class method + :meth:`TestCase.setUpTestData() <django.test.TestCase.setUpTestData>` adds + the ability to setup test data at the class level. Using this technique can + speed up the tests as compared to using ``setUp()``. + +* Fixture loading within ``TestCase`` is now performed once for the whole + ``TestCase``. + Minor features ~~~~~~~~~~~~~~ @@ -515,10 +534,6 @@ Tests * The :func:`~django.test.override_settings` decorator can now affect the master router in :setting:`DATABASE_ROUTERS`. -* Added the ability to setup test data at the class level using - :meth:`TestCase.setUpTestData() <django.test.TestCase.setUpTestData>`. Using - this technique can speed up the tests as compared to using ``setUp()``. - * Added test client support for file uploads with file-like objects. Validators |
