We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1830acd commit 39c8dccCopy full SHA for 39c8dcc
pytest_django/plugin.py
@@ -445,6 +445,9 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
445
446
from django.test import TestCase, TransactionTestCase
447
448
+ # Reorder the tests as Django does:
449
+ # https://docs.djangoproject.com/en/6.0/topics/testing/overview/#order-in-which-tests-are-executed
450
+
451
def get_order_number(test: pytest.Item) -> int:
452
test_cls = getattr(test, "cls", None)
453
if test_cls and issubclass(test_cls, TransactionTestCase):
0 commit comments