Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16681 closed Cleanup/optimization (fixed)

modeltests.invalid_models tests are a weird special case

Reported by: anthonyb Owned by: nobody
Component: Testing framework Version: 1.3
Severity: Normal Keywords: invalid models invalid_models
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The test application in modeltests.invalid_models is broken, so there's a bunch of special case handling in the test runner to avoid importing/running it, as well as a top level unittest.TestCase class. It also means that you can't specifically run the invalid_models test, and have to run them as part of the whole suite.

Attached is a patch which pushes the broken app down into a subdirectory, and removes ~60 special case lines from runtests.py.

Attachments (1)

django-invalid-model-tests.diff (56.2 KB ) - added by anthonyb 13 years ago.
Patch to fix invalid_models and streamline runtests.py

Download all attachments as: .zip

Change History (3)

by anthonyb, 13 years ago

Patch to fix invalid_models and streamline runtests.py

comment:1 by Russell Keith-Magee, 13 years ago

Resolution: fixed
Status: newclosed

In [16661]:

Fixed #16681 -- Refactored the invalid_models unit test so that it can be invoked manually. Thanks to Anthony Briggs for the report and patch.

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

In [16674]:

[1.3.X] Fixed #16681 -- Refactored the invalid_models unit test so that it can be invoked manually. Thanks to Anthony Briggs for the report and patch.

Backport of r16661 from trunk.

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