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 , 6 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 6 years ago
Summary: | manage.py test does not always accept test-runner specific command line options → manage.py test --testrunner doesn't work if not followed by an equals sign |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:3 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In 08f36035: