File tree 2 files changed +12
-2
lines changed
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):
224
224
225
225
Validator = VALIDATORS .get (version .name )
226
226
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
+
227
231
test_files = collect (version )
228
232
for case in cases (test_files ):
229
233
with self .subTest (case = case ):
230
234
try :
231
- Validator .check_schema (case ["schema" ])
235
+ Validator .check_schema (
236
+ case ["schema" ],
237
+ format_checker = Validator .FORMAT_CHECKER ,
238
+ )
232
239
except jsonschema .SchemaError :
233
240
self .fail (
234
241
"Found an invalid schema. "
@@ -262,6 +269,9 @@ class SanityTests(unittest.TestCase):
262
269
with self .subTest (path = path ):
263
270
try :
264
271
validator .validate (cases )
272
+ except jsonschema .exceptions .RefResolutionError as error :
273
+ # python-jsonschema/jsonschema#884
274
+ pass
265
275
except jsonschema .ValidationError as error :
266
276
self .fail (str (error ))
267
277
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ skipsdist = True
5
5
6
6
[testenv:sanity]
7
7
# used just for validating the structure of the test case files themselves
8
- deps = jsonschema ==4.6.1
8
+ deps = jsonschema ==4.17.3
9
9
commands = {envpython} bin/jsonschema_suite check
You can’t perform that action at this time.
0 commit comments