File tree 2 files changed +5
-2
lines changed 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def pytest_collection_modifyitems(config, items):
13
13
slow_items = []
14
14
neutral_items = []
15
15
16
- slow_fixturenames = ( "testdir" ,)
16
+ spawn_names = { "spawn_pytest" , "spawn" }
17
17
18
18
for item in items :
19
19
try :
@@ -23,7 +23,9 @@ def pytest_collection_modifyitems(config, items):
23
23
# (https://github.com/pytest-dev/pytest/issues/5070)
24
24
neutral_items .append (item )
25
25
else :
26
- if any (x for x in fixtures if x in slow_fixturenames ):
26
+ if "testdir" in fixtures :
27
+ if spawn_names .intersection (item .function .__code__ .co_names ):
28
+ item .add_marker (pytest .mark .uses_pexpect )
27
29
slow_items .append (item )
28
30
else :
29
31
marker = item .get_closest_marker ("slow" )
Original file line number Diff line number Diff line change @@ -175,6 +175,7 @@ markers =
175
175
baz
176
176
# conftest.py reorders tests moving slow ones to the end of the list
177
177
slow
178
+ uses_pexpect
178
179
179
180
[flake8]
180
181
max-line-length = 120
You can’t perform that action at this time.
0 commit comments