Changes between Initial Version and Version 1 of Ticket #36429, comment 3


Ignore:
Timestamp:
Jun 4, 2025, 8:45:28 AM (3 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36429, comment 3

    initial v1  
    22
    33{{{#!diff
    4 +class _SerializedRollbackTransactionTestCase:
     4index c8bb16e7b3..85b9c26427 100644
     5--- a/django/test/runner.py
     6+++ b/django/test/runner.py
     7@@ -21,7 +21,7 @@
     8 import django
     9 from django.core.management import call_command
     10 from django.db import connections
     11-from django.test import SimpleTestCase, TestCase
     12+from django.test import SimpleTestCase, TestCase, TransactionTestCase
     13 from django.test.utils import NullTimeKeeper, TimeKeeper, iter_test_cases
     14 from django.test.utils import setup_databases as _setup_databases
     15 from django.test.utils import setup_test_environment
     16@@ -656,6 +656,19 @@ def shuffle(self, items, key):
     17         return [hashes[hashed] for hashed in sorted(hashes)]
     18
     19
     20+class _SerializedRollbackTransactionTestCaseType(type):
    521+    def __instancecheck__(self, instance):
    622+        return (
     
    925+
    1026+
     27+class _SerializedRollbackTransactionTestCase(
     28+    metaclass=_SerializedRollbackTransactionTestCaseType
     29+):
     30+    pass
     31+
     32+
    1133 class DiscoverRunner:
    1234     """A Django test runner that uses unittest2 test discovery."""
    1335
    14 @@ -663,7 +670,7 @@ class DiscoverRunner:
     36@@ -663,7 +676,7 @@ class DiscoverRunner:
    1537     parallel_test_suite = ParallelTestSuite
    1638     test_runner = unittest.TextTestRunner
Back to Top