Opened 6 years ago

Closed 6 years ago

#10165 closed (fixed)

Honor TEST_RUNNER setting on runtests.py

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

Description

When running Django on Jython, we like to use a custom test runner to run the Django test suite. Unfortunately, runtests is hardcoded to use the simple runner bundled with Django.

It could be argued that I can always write my own runtests.py, but runtests itself is clearly not API-oriented and at least the whole django_tests function should be duplicated.

The attached patch is quite non-invasive and uses the runner specified on the settings, just as the "test" management command does.

Attachments (1)

use_testrunner_setting_on_runtests.diff (2.4 KB) - added by leosoto 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by leosoto

comment:1 Changed 6 years ago by ericholscher

  • Owner changed from nobody to ericholscher
  • Status changed from new to assigned

Seems like a good idea. Marketing as accepted.

comment:2 Changed 6 years ago by ericholscher

  • Owner ericholscher deleted
  • Status changed from assigned to new

comment:3 Changed 6 years ago by ericholscher

  • Triage Stage changed from Unreviewed to Accepted

Triage fail.

comment:4 Changed 6 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(In [9918]) Fixed #10165 -- Use settings.TEST_RUNNER in runtests.py

This permits running Django's core tests under an alternative test runner. Most
likely useful to non-CPython implementations, rather than much else (since
Django's core tests might assume things about the test runner).

Patch from Leo Soto.

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