Opened 6 years ago

Closed 6 years ago

#29704 closed Bug (fixed)

manage.py test --testrunner doesn't work if not followed by an equals sign

Reported by: Matthijs Kooijman Owned by: nobody
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The testrunner that is used can define an add_arguments() method to specify additional commandline arguments for the test management command. To make this work even when the testrunner to be used is specified on the commandline, the test command prescans the commandline for the --testrunner option, to call the runner's add_arguments() before the actual commandline parsing happens.

Previously, the prescanning only considers options looking like --testrunner=foo, while the real parsing also accepts options like --testrunner foo. In the latter case, additional arguments defined by the testrunner are not be accepted.

A PR is available here, which includes testcases showing the problem: https://github.com/django/django/pull/10307

Change History (3)

comment:1 by Carlton Gibson, 6 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Tim Graham, 6 years ago

Summary: manage.py test does not always accept test-runner specific command line optionsmanage.py test --testrunner doesn't work if not followed by an equals sign
Triage Stage: AcceptedReady for checkin

comment:3 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: newclosed

In 08f36035:

Fixed #29704 -- Fixed manage.py test --testrunner if it isn't followed by an equals sign.

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