diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/4.1.txt | 3 | ||||
| -rw-r--r-- | docs/topics/testing/overview.txt | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt index ff1c59c852..be028f0623 100644 --- a/docs/releases/4.1.txt +++ b/docs/releases/4.1.txt @@ -260,6 +260,9 @@ Miscellaneous :class:`~django.contrib.contenttypes.fields.GenericRelation` are now cached on the :class:`~django.db.models.Model` instance to which they belong. +* The Django test runner now returns a non-zero error code for unexpected + successes from tests marked with :py:func:`unittest.expectedFailure`. + .. _deprecated-features-4.1: Features deprecated in 4.1 diff --git a/docs/topics/testing/overview.txt b/docs/topics/testing/overview.txt index cc55224761..3c45d509ae 100644 --- a/docs/topics/testing/overview.txt +++ b/docs/topics/testing/overview.txt @@ -331,10 +331,15 @@ but it's pretty intuitive. You can consult the documentation of Python's :mod:`unittest` library for details. Note that the return code for the test-runner script is 1 for any number of -failed and erroneous tests. If all the tests pass, the return code is 0. This +failed tests (whether the failure was caused by an error, a failed assertion, +or an unexpected success). If all the tests pass, the return code is 0. This feature is useful if you're using the test-runner script in a shell script and need to test for success or failure at that level. +.. versionchanged:: 4.1 + + In older versions, the return code was 0 for unexpected successes. + .. _speeding-up-tests-auth-hashers: Speeding up the tests |
