Opened 16 years ago

Closed 16 years ago

#6168 closed (fixed)

Cannot run invalid_models tests individually from runtests.py

Reported by: floguy Owned by: floguy
Component: Testing framework Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

There is a small bug in runtests.py which prevents the invalid_models test individually from runtests.py.

Attachments (2)

runtests_bug.diff (569 bytes ) - added by floguy 16 years ago.
runtests_bug.2.diff (903 bytes ) - added by floguy 16 years ago.
Fixed the real problem. The tests were getting added just fine, but "test_labels" was still getting passed in along with the other apps. When the test runner attempted to import the "invalid_models" app, then everything crashed and burned. Simply removing that entry from test_labels keeps all other functionality intact while fixing the problem at hand.

Download all attachments as: .zip

Change History (5)

by floguy, 16 years ago

Attachment: runtests_bug.diff added

comment:1 by floguy, 16 years ago

Owner: changed from nobody to floguy
Status: newassigned

comment:2 by Russell Keith-Magee, 16 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

The problem definitely exists, but the solution isn't as simple as described. test_models is detritus of some kind; it's an empty list, and is never changed. The patch provided changes the way other tests can be invoked. Here's the validation cases:

./runtests --settings=XXX
should run the full suite (seems to be correct with patch)

./runtests --settings=XXX test_client_regress
should run 15 tests (with patch, runs 19)

./runtests --settings=XXX test_client_regress.AssertContainsTests
should run 1 test (with patch, runs 19)

by floguy, 16 years ago

Attachment: runtests_bug.2.diff added

Fixed the real problem. The tests were getting added just fine, but "test_labels" was still getting passed in along with the other apps. When the test runner attempted to import the "invalid_models" app, then everything crashed and burned. Simply removing that entry from test_labels keeps all other functionality intact while fixing the problem at hand.

comment:3 by Russell Keith-Magee, 16 years ago

Resolution: fixed
Status: assignedclosed

In [7576]: Fixed #6168 -- Updated the Django system test runner to make it possible to run the invalid_models test (and any other invalid_ test) explicitly, rather than just as part of the full suite. Thanks for tracking down the problem, Eric Florenzano.

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