mirror of
https://github.com/django/django.git
synced 2025-09-13 22:16:28 +00:00
Fixed #25415 -- Made DiscoverRunner run system checks.
This commit is contained in:
parent
391c450fba
commit
5eff8a7783
7 changed files with 42 additions and 1 deletions
|
@ -197,6 +197,7 @@ In the terminal, we can run our test::
|
|||
and you'll see something like::
|
||||
|
||||
Creating test database for alias 'default'...
|
||||
System check identified no issues (0 silenced).
|
||||
F
|
||||
======================================================================
|
||||
FAIL: test_was_published_recently_with_future_question (polls.tests.QuestionMethodTests)
|
||||
|
@ -250,6 +251,7 @@ past:
|
|||
and run the test again::
|
||||
|
||||
Creating test database for alias 'default'...
|
||||
System check identified no issues (0 silenced).
|
||||
.
|
||||
----------------------------------------------------------------------
|
||||
Ran 1 test in 0.001s
|
||||
|
|
|
@ -434,6 +434,10 @@ Tests
|
|||
* Added support for :meth:`python:unittest.TestCase.subTest`’s when using the
|
||||
:option:`test --parallel` option.
|
||||
|
||||
* ``DiscoverRunner`` now runs the system checks at the start of a test run.
|
||||
Override the :meth:`.DiscoverRunner.run_checks` method if you want to disable
|
||||
that.
|
||||
|
||||
URLs
|
||||
~~~~
|
||||
|
||||
|
|
|
@ -402,12 +402,18 @@ testing behavior. This behavior involves:
|
|||
#. Running ``migrate`` to install models and initial data into the test
|
||||
databases.
|
||||
|
||||
#. Running the :doc:`system checks </topics/checks>`.
|
||||
|
||||
#. Running the tests that were found.
|
||||
|
||||
#. Destroying the test databases.
|
||||
|
||||
#. Performing global post-test teardown.
|
||||
|
||||
.. versionchanged:: 1.11
|
||||
|
||||
Running the system checks was added.
|
||||
|
||||
If you define your own test runner class and point :setting:`TEST_RUNNER` at
|
||||
that class, Django will execute your test runner whenever you run
|
||||
``./manage.py test``. In this way, it is possible to use any test framework
|
||||
|
@ -566,6 +572,12 @@ Methods
|
|||
Creates the test databases by calling
|
||||
:func:`~django.test.utils.setup_databases`.
|
||||
|
||||
.. method:: DiscoverRunner.run_checks()
|
||||
|
||||
.. versionadded:: 1.11
|
||||
|
||||
Runs the :doc:`system checks </topics/checks>`.
|
||||
|
||||
.. method:: DiscoverRunner.run_suite(suite, **kwargs)
|
||||
|
||||
Runs the test suite.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue