Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#12932 closed (fixed)

Django Test runner suite_result should be passed in the suite.

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

Description

I have a use case where I want need the suite in the use of reporting the result. Currently I have to subclass all of run_tests to get at it:

http://github.com/ericholscher/pony_utils/blob/50355eaab2ae42e327a06380d975fae9ab33e19b/pony_utils/django/test_runner.py#L16

It also seems like allowing some (or all) of these functions should take kwargs, so that when we find stuff like this in the future it doesn't break backwards compatibility. Stuff like setup_test_environment might not, because it's just a basic wrapper, but it seems like a good future-proofing step.

Attached is a patch that does this.

Attachments (1)

django_12932.diff (2.8 KB) - added by ericholscher 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by ericholscher

comment:1 Changed 4 years ago by jezdez

  • Component changed from Uncategorized to Testing framework
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by russellm

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

(In [12487]) Fixed #12932 -- Added an extra argument to suite_result() in the test runner, and added kwargs as protection against future changes. Thanks to Eric Holscher for the report and patch.

This is BACKWARDS INCOMPATIBLE for anyone that has written a custom DjangoTestRunner class since it was introduced in r12255.

comment:3 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.