Opened 3 weeks ago

Closed 2 weeks ago

#35952 closed Cleanup/optimization (fixed)

Internal test runner requirement for TransactionTestCase to set available_apps raises TypeError

Reported by: Jacob Walls Owned by: Jake Howard
Component: Testing framework 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: yes UI/UX: no

Description

Reported by Jake Howard in PR:

The internal test runner (runtests.py) requires that available_apps be set as a class attribute on TransactionTestCase subclasses, but accomplishes this with a property. After 8eca3e9bce519c21340312ee7846c92b27abea79, it needs to be a classproperty.

To reproduce, alter one of Django's TransactionTestCase subclasses to remove the available_apps attribute:

------------------
Traceback (most recent call last):
  File "/Users/.../django/django/apps/registry.py", line 318, in set_available_apps
    available = set(available)
TypeError: 'property' object is not iterable

Regression in 8eca3e9bce519c21340312ee7846c92b27abea79, but not marking as a release blocker or needs tests since this is an internal tool only and not tested.

Change History (4)

comment:1 by Jacob Walls, 3 weeks ago

Easy pickings: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

comment:2 by Jake Howard, 3 weeks ago

Patch needs improvement: unset

comment:3 by Jacob Walls, 3 weeks ago

Triage Stage: AcceptedReady for checkin

comment:4 by Sarah Boyce <42296566+sarahboyce@…>, 2 weeks ago

Resolution: fixed
Status: assignedclosed

In 58e548d:

Fixed #35952 -- Used class property for available apps check on TransactionTestCase.

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