#36429: IntegrityError on contentype creation when using transactional test with
AND without serialized_rollback
-----------------------------------+------------------------------------
Reporter: Julie Rymer | Owner: (none)
Type: Bug | Status: new
Component: Testing framework | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Comment (by Simon Charette):
A similar re-ordering strategy could be employed in this case. Something
like
{{{#!diff
+class _SerializedRollbackTransactionTestCase:
+ def __instancecheck__(self, instance):
+ return (
+ isinstance(instance, TransactionTestCase) and
instance.serialized_rollback
+ )
+
+
class DiscoverRunner:
"""A Django test runner that uses unittest2 test discovery."""
@@ -663,7 +670,7 @@ class DiscoverRunner:
parallel_test_suite = ParallelTestSuite
test_runner = unittest.TextTestRunner
test_loader = unittest.defaultTestLoader
- reorder_by = (TestCase, SimpleTestCase)
+ reorder_by = (TestCase, _SerializedRollbackTransactionTestCase,
SimpleTestCase)
def __init__(
self,
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36429#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019736104eaf-80bf8468-eea8-415e-b57e-53b8cc1121bc-000000%40eu-central-1.amazonses.com.