File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -224,11 +224,18 @@ class SanityTests(unittest.TestCase):
224224
225225 Validator = VALIDATORS .get (version .name )
226226 if Validator is not None :
227+ # Valid (optional test) schemas contain regexes which
228+ # aren't valid Python regexes, so skip checking it
229+ Validator .FORMAT_CHECKER .checkers .pop ("regex" , None )
230+
227231 test_files = collect (version )
228232 for case in cases (test_files ):
229233 with self .subTest (case = case ):
230234 try :
231- Validator .check_schema (case ["schema" ])
235+ Validator .check_schema (
236+ case ["schema" ],
237+ format_checker = Validator .FORMAT_CHECKER ,
238+ )
232239 except jsonschema .SchemaError :
233240 self .fail (
234241 "Found an invalid schema. "
@@ -262,6 +269,9 @@ class SanityTests(unittest.TestCase):
262269 with self .subTest (path = path ):
263270 try :
264271 validator .validate (cases )
272+ except jsonschema .exceptions .RefResolutionError as error :
273+ # python-jsonschema/jsonschema#884
274+ pass
265275 except jsonschema .ValidationError as error :
266276 self .fail (str (error ))
267277
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ skipsdist = True
55
66[testenv:sanity]
77# used just for validating the structure of the test case files themselves
8- deps = jsonschema ==4.6.1
8+ deps = jsonschema ==4.17.3
99commands = {envpython} bin/jsonschema_suite check
You can’t perform that action at this time.
0 commit comments