File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change 1
1
from functools import lru_cache
2
2
from pathlib import Path
3
+ import warnings
3
4
4
5
from hypothesis import settings
5
6
from pytest import mark
@@ -125,18 +126,27 @@ def pytest_collection_modifyitems(config, items):
125
126
disabled_exts = config .getoption ("--disable-extension" )
126
127
disabled_dds = config .getoption ("--disable-data-dependent-shapes" )
127
128
ci = config .getoption ("--ci" )
128
- for item in items :
129
- markers = list (item .iter_markers ())
130
- # skip if specified in skips file
131
- for id_ in skip_ids :
129
+ # skip if specified in skips file
130
+ for id_ in skip_ids :
131
+ for item in items :
132
132
if id_ in item .nodeid :
133
133
item .add_marker (mark .skip (reason = f"skips file ({ skips_file } )" ))
134
134
break
135
- # xfail if specified in xfails file
136
- for id_ in xfail_ids :
135
+ else :
136
+ warnings .warn (f"Skip ID from { skips_file } doesn't appear to correspond to any tests: { id_ !r} " )
137
+
138
+ # xfail if specified in xfails file
139
+ for id_ in xfail_ids :
140
+ for item in items :
137
141
if id_ in item .nodeid :
138
142
item .add_marker (mark .xfail (reason = f"xfails file ({ xfails_file } )" ))
139
143
break
144
+ else :
145
+ warnings .warn (f"XFAIL ID from { xfails_file } doesn't appear to correspond to any tests: { id_ !r} " )
146
+
147
+ for item in items :
148
+ markers = list (item .iter_markers ())
149
+
140
150
# skip if disabled or non-existent extension
141
151
ext_mark = next ((m for m in markers if m .name == "xp_extension" ), None )
142
152
if ext_mark is not None :
You can’t perform that action at this time.
0 commit comments