Opened 11 years ago

Closed 11 years ago

#19156 closed Bug (duplicate)

Test can not be run individually for apps that have tests.suite() defined

Reported by: Aigars Mahinovs Owned by: nobody
Component: Testing framework Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no


This issue shows up if the tests are defined in the application using the suite(). The django.test.simple.build_suite() function has support for such arrangement (which is why testing the whole app works), but django.test.simple.build_test() does not which is why running a single test class or test case fails. The fix would be to call build_suite in build_test and then iterate over the TestSuite, just like it is done in the Doctest code in the same function.

Attachments (1)

django-test-suite.patch (792 bytes ) - added by Aigars Mahinovs 11 years ago.
Quick and rough fix for the bug

Download all attachments as: .zip

Change History (5)

by Aigars Mahinovs, 11 years ago

Attachment: django-test-suite.patch added

Quick and rough fix for the bug

comment:1 by Aigars Mahinovs, 11 years ago

Has patch: set
Patch needs improvement: set

comment:2 by daGrevis, 11 years ago

I approve.

comment:3 by Aymeric Augustin, 11 years ago

Thanks for the report. As far as I can tell, this is the same problem as #6712.

comment:4 by Aymeric Augustin, 11 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top