Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16528 closed Bug (fixed)

Error in documentation? (test runner return code)

Reported by: anonymous Owned by: teraom
Component: Documentation Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

From the release docs for Django 1.2 it would look like the exit status code returned by the test runner scripts no longer represents the number of failed tests.

The exit status code of the test runners (tests/runtests.py and python manage.py test) no longer represents the number of failed tests, because a failure of 256 or more tests resulted in a wrong exit status code. The exit status code for the test runner is now 0 for success (no failing tests) and 1 for any number of test failures. If needed, the number of test failures can be found at the end of the test runner's output.

However, even in the currently existing testing documentation it is stated that the return code is the number of failed tests.

Note that the return code for the test-runner script is the total number of failed and erroneous tests. 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.

Provided "exit status code" and "return code" mean the same thing, this would look like an error to me.

Attachments (1)

testing-output-docs-16528.diff (683 bytes ) - added by teraom 13 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Ramiro Morales, 13 years ago

Triage Stage: UnreviewedAccepted

comment:2 by teraom, 13 years ago

Owner: changed from nobody to teraom
Status: newassigned

by teraom, 13 years ago

comment:3 by teraom, 13 years ago

Has patch: set

comment:4 by Julien Phalip, 13 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Julien Phalip, 13 years ago

Type: UncategorizedBug

comment:6 by Tim Graham, 13 years ago

Resolution: fixed
Status: assignedclosed

In [16584]:

Fixed #16528 - Documented test runner returns 1, regardless of the number of test failures; thanks teraom.

comment:7 by Tim Graham, 13 years ago

In [16585]:

[1.3.X] Fixed #16528 - Documented test runner returns 1, regardless of the number of test failures; thanks teraom.

Backport of r16584 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top