Opened 4 years ago

Closed 4 years ago

#31979 closed Cleanup/optimization (fixed)

Make new setup_databases() argument time_keeper optional

Reported by: Jon Dufresne Owned by: Jon Dufresne
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Ahmad A. Hussein Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The argument was added in commit 61a0ba43cfd4ff66f51a9d73dcd8ed6f6a6d9915 as work on ticket #31811.

setup_databases() is used by 3rd party tools. As well, the signature is documented: https://docs.djangoproject.com/en/3.1/topics/testing/advanced/#django.test.utils.setup_databases

For backwards compatibility, make the new argument optional. If not provided, a NullTimeKeeper can be instantiated so no other None-checks will be required deeper in the stack.

Change History (3)

comment:2 by Mariusz Felisiak, 4 years ago

Cc: Ahmad A. Hussein added
Owner: changed from nobody to Jon Dufresne
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:3 by GitHub <noreply@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 0b8871a:

Fixed #31979 -- Made django.test.utils.setup_databases()'s time_keeper argument optional.

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