Skip to content

Commit c187ea6

Browse files
committed
Sort items in-place in pytest_collection_modifyitems
1 parent bc9cda3 commit c187ea6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytest_django/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def get_order_number(test):
369369

370370
return 2
371371

372-
items[:] = sorted(items, key=get_order_number)
372+
items.sort(key=get_order_number)
373373

374374

375375
@pytest.fixture(autouse=True, scope="session")

0 commit comments

Comments
 (0)