Opened 11 months ago
Closed 11 months 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 , 11 months ago
| Easy pickings: | set |
|---|---|
| Patch needs improvement: | set |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 11 months ago
| Patch needs improvement: | unset |
|---|
comment:3 by , 11 months ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:4 by , 11 months ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
In 58e548d: