summaryrefslogtreecommitdiff
path: root/tests/test_discovery_sample3
diff options
context:
space:
mode:
authorromgar <romain.garrigues.cs@gmail.com>2018-11-19 23:15:20 +0000
committerTim Graham <timograham@gmail.com>2018-11-29 11:20:27 -0500
commit9fa0d3786febf36c87ef059a39115aa1ce3326e8 (patch)
tree3fe53c9a0011ed94dc6b235690f4b3d8c4371d2c /tests/test_discovery_sample3
parent7d1123e5ada60963ba3c708a8932e57342278706 (diff)
Refs #25251 -- Filtered out skipped tests when processing the test suite to set _next_serialized_rollback.
Diffstat (limited to 'tests/test_discovery_sample3')
-rw-r--r--tests/test_discovery_sample3/tests_transaction_test_case_mixed.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/test_discovery_sample3/tests_transaction_test_case_mixed.py b/tests/test_discovery_sample3/tests_transaction_test_case_mixed.py
index ac72238e11..13059bbb87 100644
--- a/tests/test_discovery_sample3/tests_transaction_test_case_mixed.py
+++ b/tests/test_discovery_sample3/tests_transaction_test_case_mixed.py
@@ -1,6 +1,8 @@
from unittest import TestCase
-from django.test import TestCase as DjangoTestCase, TransactionTestCase
+from django.test import (
+ TestCase as DjangoTestCase, TransactionTestCase, skipUnlessDBFeature,
+)
class TestVanillaUnittest(TestCase):
@@ -29,8 +31,19 @@ class TestTransactionTestCase2(TransactionTestCase):
self.assertEqual(1, 1)
+# django.test.runner.reorder_postprocess() ignores this skipped test when
+# assigning _next_serialized_rollback.
+@skipUnlessDBFeature('nonexistent')
class TestTransactionTestCase3(TransactionTestCase):
available_apps = ['test_discovery_sample3']
+ serialized_rollback = True
+
+ def test_sample(self):
+ self.assertEqual(1, 1)
+
+
+class TestTransactionTestCase4(TransactionTestCase):
+ available_apps = ['test_discovery_sample3']
serialized_rollback = False
def test_sample(self):