@@ -54,6 +54,10 @@ def pytest_ignore_collect(collection_path, config):
54
54
if "tests" in path_str or "test_" in path_str :
55
55
return True
56
56
57
+ for entry in config .dt_config .pytest_extra_skips :
58
+ if entry in str (collection_path ):
59
+ return True
60
+
57
61
58
62
def pytest_collection_modifyitems (config , items ):
59
63
"""
@@ -101,7 +105,7 @@ def pytest_collection_modifyitems(config, items):
101
105
# is not guaranteed)
102
106
parent_full_name = item .parent .module .__name__
103
107
is_public = "._" not in parent_full_name
104
- is_duplicate = parent_full_name in extra_skips or item .name in extra_skips
108
+ is_duplicate = parent_full_name in extra_skips or item .name in extra_skips
105
109
106
110
if is_public and not is_duplicate :
107
111
unique_items .append (item )
@@ -185,7 +189,7 @@ def collect(self):
185
189
name = self .path .name
186
190
globs = {"__name__" : "__main__" }
187
191
188
- optionflags = pydoctest . get_optionflags ( self )
192
+ optionflags = dt_config . optionflags
189
193
190
194
# Plug in the custom runner: `PytestDTRunner`
191
195
runner = _get_runner (self .config ,
@@ -231,7 +235,6 @@ def run(self, test, compileflags=None, out=None, clear_globs=False):
231
235
"""
232
236
dt_config = config .dt_config
233
237
234
-
235
238
with np_errstate ():
236
239
with dt_config .user_context_mgr (test ):
237
240
with matplotlib_make_nongui ():
0 commit comments