mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #27019 -- Made teardown_test_environment() restore the old DEBUG.
This commit is contained in:
parent
a757c68129
commit
7f9fd42b93
3 changed files with 24 additions and 6 deletions
|
@ -612,11 +612,18 @@ Testing utilities
|
|||
To assist in the creation of your own test runner, Django provides a number of
|
||||
utility methods in the ``django.test.utils`` module.
|
||||
|
||||
.. function:: setup_test_environment()
|
||||
.. function:: setup_test_environment(debug=None)
|
||||
|
||||
Performs global pre-test setup, such as installing instrumentation for the
|
||||
template rendering system and setting up the dummy email outbox.
|
||||
|
||||
If ``debug`` isn't ``None``, the :setting:`DEBUG` setting is updated to its
|
||||
value.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
The ``debug`` argument was added.
|
||||
|
||||
.. function:: teardown_test_environment()
|
||||
|
||||
Performs global post-test teardown, such as removing instrumentation from
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue