Changes between Initial Version and Version 1 of Ticket #36429, comment 3
- Timestamp:
- Jun 4, 2025, 8:45:28 AM (3 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36429, comment 3
initial v1 2 2 3 3 {{{#!diff 4 +class _SerializedRollbackTransactionTestCase: 4 index 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): 5 21 + def __instancecheck__(self, instance): 6 22 + return ( … … 9 25 + 10 26 + 27 +class _SerializedRollbackTransactionTestCase( 28 + metaclass=_SerializedRollbackTransactionTestCaseType 29 +): 30 + pass 31 + 32 + 11 33 class DiscoverRunner: 12 34 """A Django test runner that uses unittest2 test discovery.""" 13 35 14 @@ -663,7 +67 0,7 @@ class DiscoverRunner:36 @@ -663,7 +676,7 @@ class DiscoverRunner: 15 37 parallel_test_suite = ParallelTestSuite 16 38 test_runner = unittest.TextTestRunner