@@ -28,14 +28,14 @@ def skipper(test):
28
28
return skipper
29
29
30
30
31
- def missing_format (checker ):
31
+ def missing_format (Validator ):
32
32
def missing_format (test ): # pragma: no cover
33
33
schema = test .schema
34
34
if (
35
35
schema is True
36
36
or schema is False
37
37
or "format" not in schema
38
- or schema ["format" ] in checker .checkers
38
+ or schema ["format" ] in Validator . FORMAT_CHECKER .checkers
39
39
or test .valid
40
40
):
41
41
return
@@ -150,10 +150,10 @@ def leap_second(test):
150
150
DRAFT3 .optional_tests_of (name = "non-bmp-regex" ),
151
151
DRAFT3 .optional_tests_of (name = "zeroTerminatedFloats" ),
152
152
Validator = jsonschema .Draft3Validator ,
153
- format_checker = jsonschema .draft3_format_checker ,
153
+ format_checker = jsonschema .Draft3Validator . FORMAT_CHECKER ,
154
154
skip = lambda test : (
155
155
narrow_unicode_build (test )
156
- or missing_format (jsonschema .draft3_format_checker )(test )
156
+ or missing_format (jsonschema .Draft3Validator )(test )
157
157
or complex_email_validation (test )
158
158
or skip (
159
159
message = bug (),
@@ -175,12 +175,12 @@ def leap_second(test):
175
175
DRAFT4 .optional_tests_of (name = "non-bmp-regex" ),
176
176
DRAFT4 .optional_tests_of (name = "zeroTerminatedFloats" ),
177
177
Validator = jsonschema .Draft4Validator ,
178
- format_checker = jsonschema .draft4_format_checker ,
178
+ format_checker = jsonschema .Draft4Validator . FORMAT_CHECKER ,
179
179
skip = lambda test : (
180
180
narrow_unicode_build (test )
181
181
or allowed_leading_zeros (test )
182
182
or leap_second (test )
183
- or missing_format (jsonschema .draft4_format_checker )(test )
183
+ or missing_format (jsonschema .Draft4Validator )(test )
184
184
or complex_email_validation (test )
185
185
or skip (
186
186
message = bug (),
@@ -236,12 +236,12 @@ def leap_second(test):
236
236
DRAFT6 .optional_tests_of (name = "float-overflow" ),
237
237
DRAFT6 .optional_tests_of (name = "non-bmp-regex" ),
238
238
Validator = jsonschema .Draft6Validator ,
239
- format_checker = jsonschema .draft6_format_checker ,
239
+ format_checker = jsonschema .Draft6Validator . FORMAT_CHECKER ,
240
240
skip = lambda test : (
241
241
narrow_unicode_build (test )
242
242
or allowed_leading_zeros (test )
243
243
or leap_second (test )
244
- or missing_format (jsonschema .draft6_format_checker )(test )
244
+ or missing_format (jsonschema .Draft6Validator )(test )
245
245
or complex_email_validation (test )
246
246
or skip (
247
247
message = bug (),
@@ -260,12 +260,12 @@ def leap_second(test):
260
260
DRAFT7 .optional_tests_of (name = "float-overflow" ),
261
261
DRAFT7 .optional_tests_of (name = "non-bmp-regex" ),
262
262
Validator = jsonschema .Draft7Validator ,
263
- format_checker = jsonschema .draft7_format_checker ,
263
+ format_checker = jsonschema .Draft7Validator . FORMAT_CHECKER ,
264
264
skip = lambda test : (
265
265
narrow_unicode_build (test )
266
266
or allowed_leading_zeros (test )
267
267
or leap_second (test )
268
- or missing_format (jsonschema .draft7_format_checker )(test )
268
+ or missing_format (jsonschema .Draft7Validator )(test )
269
269
or complex_email_validation (test )
270
270
or skip (
271
271
message = bug (),
@@ -408,12 +408,12 @@ def leap_second(test):
408
408
TestDraft201909Format = DRAFT201909 .to_unittest_testcase (
409
409
DRAFT201909 .format_tests (),
410
410
Validator = jsonschema .Draft201909Validator ,
411
- format_checker = jsonschema .draft201909_format_checker ,
411
+ format_checker = jsonschema .Draft201909Validator . FORMAT_CHECKER ,
412
412
skip = lambda test : (
413
413
complex_email_validation (test )
414
414
or allowed_leading_zeros (test )
415
415
or leap_second (test )
416
- or missing_format (jsonschema .draft201909_format_checker )(test )
416
+ or missing_format (jsonschema .Draft201909Validator )(test )
417
417
or complex_email_validation (test )
418
418
),
419
419
)
@@ -533,12 +533,12 @@ def leap_second(test):
533
533
TestDraft202012Format = DRAFT202012 .to_unittest_testcase (
534
534
DRAFT202012 .format_tests (),
535
535
Validator = jsonschema .Draft202012Validator ,
536
- format_checker = jsonschema .draft202012_format_checker ,
536
+ format_checker = jsonschema .Draft202012Validator . FORMAT_CHECKER ,
537
537
skip = lambda test : (
538
538
complex_email_validation (test )
539
539
or allowed_leading_zeros (test )
540
540
or leap_second (test )
541
- or missing_format (jsonschema .draft202012_format_checker )(test )
541
+ or missing_format (jsonschema .Draft202012Validator )(test )
542
542
or complex_email_validation (test )
543
543
),
544
544
)
0 commit comments