mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +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:
committed by
Mariusz Felisiak
parent
11ebc6479f
commit
57dadfac3c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user