Opened 9 hours ago

Last modified 8 hours ago

#35952 assigned Cleanup/optimization

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 (3)

comment:1 by Jacob Walls, 9 hours ago

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

comment:2 by Jake Howard, 8 hours ago

Patch needs improvement: unset

comment:3 by Jacob Walls, 8 hours ago

Triage Stage: AcceptedReady for checkin
Note: See TracTickets for help on using tickets.
Back to Top