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 1717 FALSEY ,
1818 TRUTHY ,
1919 TYPE_STRINGS ,
20- HypothesisRefResolutionError ,
2120 Schema ,
2221 canonicalish ,
2322 get_integer_bounds ,
@@ -113,12 +112,7 @@ def __from_schema(
113112 * ,
114113 custom_formats : Dict [str , st .SearchStrategy [str ]] = None ,
115114) -> 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 )
122116 # We check for _FORMATS_TOKEN to avoid re-validating known good data.
123117 if custom_formats is not None and _FORMATS_TOKEN not in custom_formats :
124118 assert isinstance (custom_formats , dict )
Original file line number Diff line number Diff line change 2121from hypothesis .internal .reflection import proxies
2222
2323from hypothesis_jsonschema ._canonicalise import (
24- HypothesisRefResolutionError ,
2524 canonicalish ,
2625 resolve_all_refs ,
2726)
@@ -242,16 +241,8 @@ def inner(*args, **kwargs):
242241 assert isinstance (name , str )
243242 try :
244243 f (* args , ** kwargs )
245- assert name not in RECURSIVE_REFS
246244 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 ):
255246 pytest .xfail ()
256247 raise
257248
You can’t perform that action at this time.
0 commit comments