File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 66import os
77
88from hypothesis import settings
9+ from hypothesis .errors import InvalidArgument
910from pytest import mark
1011
1112from array_api_tests import _array_module as xp
@@ -205,7 +206,13 @@ def pytest_collection_modifyitems(config, items):
205206 if any (m .name == "unvectorized" for m in markers ):
206207 # TODO: limit generated examples when settings already applied
207208 if not hasattr (item .obj , "_hypothesis_internal_settings_applied" ):
208- item .obj = settings (max_examples = unvectorized_max_examples )(item .obj )
209+ try :
210+ item .obj = settings (max_examples = unvectorized_max_examples )(item .obj )
211+ except InvalidArgument as e :
212+ warnings .warn (
213+ f"Tried decorating { item .name } with settings() but got "
214+ f"hypothesis.errors.InvalidArgument: { e } "
215+ )
209216
210217
211218 # 3. Warn on bad skipped/xfailed ids
You can’t perform that action at this time.
0 commit comments