Opened 14 years ago
Closed 13 years ago
#15675 closed New feature (fixed)
Allow TestRunners to define their own command-line options
Reported by: | msiedlarek | Owned by: | msiedlarek |
---|---|---|---|
Component: | Testing framework | Version: | 1.3 |
Severity: | Normal | Keywords: | test, management, test runner |
Cc: | msiedlarek | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The point is to allow custom test runners do define and process their own command-line options, apart from default ones like verbose
.
Attached patch is one of possible solutions. Management command just looks for option_list
attribute in a test runner and if it's present, adds it to its own option_list
. Any comments or better ideas are welcome.
Attachments (5)
Change History (17)
comment:1 by , 14 years ago
Has patch: | set |
---|
comment:2 by , 14 years ago
Owner: | changed from | to
---|---|
Triage Stage: | Unreviewed → Design decision needed |
by , 14 years ago
Attachment: | ticket15675.patch added |
---|
comment:3 by , 14 years ago
Needs tests: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Design decision needed → Accepted |
Patch looks fine to me. However, it strikes me that this is something that could be tested in some capacity; probably using the infrastructure of the admin_scripts regressiontests.
Also, for future reference: As a matter of process, you shouldn't be triaging your own tickets. If you've submitted a ticket and a patch, just leave it in unreviewed. Someone else makes the call as to whether the ticket is ok, or needs a decision, or is ready for checkin. By marking your own ticket DDN, you have move out out of a list that gets immediate attention (the unreviewed pile) and into a list that gets intermittent attention (the DDN list).
comment:4 by , 14 years ago
Ok, I'll make some tests for it.
Also thanks for pointing out my mistake - it's my first patch to Django and although I've read contributing docs some mistake just had to be made. ;)
by , 14 years ago
Attachment: | ticket15675-2.patch added |
---|
Second version of patch - with documentation
comment:5 by , 14 years ago
Type: | → New feature |
---|
by , 14 years ago
Attachment: | ticket15675-3.patch added |
---|
Third version of patch - with documentation and regression tests
comment:6 by , 14 years ago
Severity: | → Normal |
---|
Attached third version of patch with documentation and regression tests using admin_scripts infrastructure. My approach to these tests needs an answer - is it ok to cross-import form other test packages?
And other, even more newbie and quite unrelated question - how much contributor has to do to made his way to AUTHORS? :)
comment:7 by , 14 years ago
Cc: | added |
---|---|
Needs tests: | unset |
Patch needs improvement: | unset |
Status: | new → assigned |
comment:8 by , 14 years ago
Component: | Core (Other) → Testing framework |
---|
The patch looks good -- I'm going to review it in more detail. You definitely deserve your name on the list of authors, so feel free to resubmit the patch including your name while you can ;)
comment:9 by , 14 years ago
Ok, attached updated patch. The only last thing that makes me think is whether "versionadded development" in documentation is a correct approach.
by , 14 years ago
Attachment: | ticket15675-4.patch added |
---|
Fourth version of patch - merged with r16022 trunk and added AUTHORS entry
by , 14 years ago
Attachment: | ticket15675-5.patch added |
---|
Fifth version of patch - compatible with r16102 trunk
comment:10 by , 13 years ago
Easy pickings: | unset |
---|---|
UI/UX: | unset |
Ticket #16185 is a related issue; it has a patch attached which combines this patch with another new feature: the possibility to specify the test runner class on the command line.
Patch