Skip to content

Commit

Permalink
Cope with the suite permuting of ECMA format tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Jan 31, 2025
1 parent e32a12f commit 9be918e
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions jsonschema/tests/test_jsonschema_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ def skipper(test):
return skipper


def ecmascript_regex(test):
if test.subject == "ecmascript-regex":
return "ECMA regex support will be added in #1142."


def missing_format(Validator):
def missing_format(test): # pragma: no cover
schema = test.schema
Expand Down Expand Up @@ -119,7 +124,8 @@ def leap_second(test):
Validator=jsonschema.Draft3Validator,
format_checker=jsonschema.Draft3Validator.FORMAT_CHECKER,
skip=lambda test: (
missing_format(jsonschema.Draft3Validator)(test)
ecmascript_regex(test)
or missing_format(jsonschema.Draft3Validator)(test)
or complex_email_validation(test)
),
)
Expand All @@ -136,7 +142,8 @@ def leap_second(test):
Validator=jsonschema.Draft4Validator,
format_checker=jsonschema.Draft4Validator.FORMAT_CHECKER,
skip=lambda test: (
leap_second(test)
ecmascript_regex(test)
or leap_second(test)
or missing_format(jsonschema.Draft4Validator)(test)
or complex_email_validation(test)
),
Expand All @@ -153,7 +160,8 @@ def leap_second(test):
Validator=jsonschema.Draft6Validator,
format_checker=jsonschema.Draft6Validator.FORMAT_CHECKER,
skip=lambda test: (
leap_second(test)
ecmascript_regex(test)
or leap_second(test)
or missing_format(jsonschema.Draft6Validator)(test)
or complex_email_validation(test)
),
Expand All @@ -172,7 +180,8 @@ def leap_second(test):
Validator=jsonschema.Draft7Validator,
format_checker=jsonschema.Draft7Validator.FORMAT_CHECKER,
skip=lambda test: (
leap_second(test)
ecmascript_regex(test)
or leap_second(test)
or missing_format(jsonschema.Draft7Validator)(test)
or complex_email_validation(test)
),
Expand Down Expand Up @@ -208,6 +217,7 @@ def leap_second(test):
format_checker=jsonschema.Draft201909Validator.FORMAT_CHECKER,
skip=lambda test: (
complex_email_validation(test)
or ecmascript_regex(test)
or leap_second(test)
or missing_format(jsonschema.Draft201909Validator)(test)
or complex_email_validation(test)
Expand Down Expand Up @@ -244,6 +254,7 @@ def leap_second(test):
format_checker=jsonschema.Draft202012Validator.FORMAT_CHECKER,
skip=lambda test: (
complex_email_validation(test)
or ecmascript_regex(test)
or leap_second(test)
or missing_format(jsonschema.Draft202012Validator)(test)
or complex_email_validation(test)
Expand Down

0 comments on commit 9be918e

Please sign in to comment.