We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1460ad6 + f75f7c1 commit 322d686Copy full SHA for 322d686
testing/conftest.py
@@ -1,5 +1,13 @@
1
+import pytest
2
+
3
4
+@pytest.hookimpl(hookwrapper=True, tryfirst=True)
5
def pytest_collection_modifyitems(config, items):
- """Prefer faster tests."""
6
+ """Prefer faster tests.
7
8
+ Use a hookwrapper to do this in the beginning, so e.g. --ff still works
9
+ correctly.
10
+ """
11
fast_items = []
12
slow_items = []
13
neutral_items = []
@@ -24,3 +32,5 @@ def pytest_collection_modifyitems(config, items):
24
32
fast_items.append(item)
25
33
26
34
items[:] = fast_items + neutral_items + slow_items
35
36
+ yield
0 commit comments