File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change 22
33
44def pytest_collection_modifyitems (items , config ):
5- sync_items = []
6- async_items = [
7- item
8- for item in items
9- if "asynchronous" in item .fspath .dirname or sync_items .append (item ) # type: ignore[func-returns-value]
10- ]
11- for item in async_items :
12- if not any (item .iter_markers ()):
13- item .add_marker ("default_async" )
14- for item in sync_items :
15- if not any (item .iter_markers ()):
16- item .add_marker ("default" )
5+ # Markers that should overlap with the default markers.
6+ overlap_markers = ["async" ]
7+
8+ for item in items :
9+ if "asynchronous" in item .fspath .dirname :
10+ default_marker = "default_async"
11+ else :
12+ default_marker = "default"
13+ markers = [m for m in item .iter_markes () if m not in overlap_markers ]
14+ if not markers :
15+ item .add_marker (default_marker )
You can’t perform that action at this time.
0 commit comments