File tree Expand file tree Collapse file tree 2 files changed +2
-17
lines changed
src/hypothesis_jsonschema Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change 17
17
FALSEY ,
18
18
TRUTHY ,
19
19
TYPE_STRINGS ,
20
- HypothesisRefResolutionError ,
21
20
Schema ,
22
21
canonicalish ,
23
22
get_integer_bounds ,
@@ -113,12 +112,7 @@ def __from_schema(
113
112
* ,
114
113
custom_formats : Dict [str , st .SearchStrategy [str ]] = None ,
115
114
) -> st .SearchStrategy [JSONType ]:
116
- try :
117
- schema , _ = resolve_all_refs (schema )
118
- except RecursionError :
119
- raise HypothesisRefResolutionError (
120
- f"Could not resolve recursive references in schema={ schema !r} "
121
- ) from None
115
+ schema , _ = resolve_all_refs (schema )
122
116
# We check for _FORMATS_TOKEN to avoid re-validating known good data.
123
117
if custom_formats is not None and _FORMATS_TOKEN not in custom_formats :
124
118
assert isinstance (custom_formats , dict )
Original file line number Diff line number Diff line change 21
21
from hypothesis .internal .reflection import proxies
22
22
23
23
from hypothesis_jsonschema ._canonicalise import (
24
- HypothesisRefResolutionError ,
25
24
canonicalish ,
26
25
resolve_all_refs ,
27
26
)
@@ -242,16 +241,8 @@ def inner(*args, **kwargs):
242
241
assert isinstance (name , str )
243
242
try :
244
243
f (* args , ** kwargs )
245
- assert name not in RECURSIVE_REFS
246
244
except jsonschema .exceptions .RefResolutionError as err :
247
- if (
248
- isinstance (err , HypothesisRefResolutionError )
249
- or isinstance (err ._cause , HypothesisRefResolutionError )
250
- ) and (
251
- "does not fetch remote references" in str (err )
252
- or name in RECURSIVE_REFS
253
- and "Could not resolve recursive references" in str (err )
254
- ):
245
+ if "does not fetch remote references" in str (err ):
255
246
pytest .xfail ()
256
247
raise
257
248
You can’t perform that action at this time.
0 commit comments