File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 6
6
import os
7
7
8
8
from hypothesis import settings
9
+ from hypothesis .errors import InvalidArgument
9
10
from pytest import mark
10
11
11
12
from array_api_tests import _array_module as xp
@@ -205,7 +206,13 @@ def pytest_collection_modifyitems(config, items):
205
206
if any (m .name == "unvectorized" for m in markers ):
206
207
# TODO: limit generated examples when settings already applied
207
208
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
+ )
209
216
210
217
211
218
# 3. Warn on bad skipped/xfailed ids
You can’t perform that action at this time.
0 commit comments