mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #31944 -- Used addCleanup() to register TestContextDecorator cleanups.
Cleanups from addCleanup() are scheduled to happen in reverse order to the order they are added (LIFO). Ensures each cleanup is executed from the innermost to the outermost.
This commit is contained in:
parent
11ebc6479f
commit
57dadfac3c
3 changed files with 30 additions and 11 deletions
|
@ -484,6 +484,11 @@ Miscellaneous
|
|||
* The undocumented ``django.utils.http.limited_parse_qsl()`` function is
|
||||
removed. Please use :func:`urllib.parse.parse_qsl` instead.
|
||||
|
||||
* ``django.test.utils.TestContextDecorator`` now uses
|
||||
:py:meth:`~unittest.TestCase.addCleanup` so that cleanups registered in the
|
||||
:py:meth:`~unittest.TestCase.setUp` method are called before
|
||||
``TestContextDecorator.disable()``.
|
||||
|
||||
.. _deprecated-features-3.2:
|
||||
|
||||
Features deprecated in 3.2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue