Opened 2 years ago

Closed 2 years ago

#19156 closed Bug (duplicate)

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

Reported by: aigarius 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

Description

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 aigarius 2 years ago.
Quick and rough fix for the bug

Download all attachments as: .zip

Change History (5)

Changed 2 years ago by aigarius

Quick and rough fix for the bug

comment:1 Changed 2 years ago by aigarius

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement set

comment:2 Changed 2 years ago by daGrevis

I approve.

comment:3 Changed 2 years ago by aaugustin

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

comment:4 Changed 2 years ago by aaugustin

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top