Skip to content

Commit

Permalink
#782: Remove ecmascript validation, extend dynamicRef skip description
Browse files Browse the repository at this point in the history
  • Loading branch information
nezhar committed Jul 21, 2021
1 parent c6b0fc4 commit 4547b2a
Showing 1 changed file with 4 additions and 62 deletions.
66 changes: 4 additions & 62 deletions jsonschema/tests/test_jsonschema_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,62 +128,6 @@ def leap_second(test):
)(test)


def ecmascript_regex_validation(test):
"""
Considering switching from re to js-regex after the following issues are
resolved:
* https://github.com/Julian/jsonschema/issues/612
* https://github.com/Zac-HD/js-regex/issues/4
Notice: Zac-HD/js-regex Repository has been archived
"""
return skip(
message=bug(612),
subject="ecmascript-regex",
description='NKO DIGIT ZERO does not match (unlike e.g. Python)',
)(test) or skip(
message=bug(612),
subject="ecmascript-regex",
description='NKO DIGIT ZERO (as \\u escape) does not match',
)(test) or skip(
message=bug(612),
subject="ecmascript-regex",
description='NKO DIGIT ZERO matches (unlike e.g. Python)',
)(test) or skip(
message=bug(612),
subject="ecmascript-regex",
description='NKO DIGIT ZERO (as \\u escape) matches',
)(test) or skip(
message=bug(612),
subject="ecmascript-regex",
description='zero-width whitespace matches',
)(test) or skip(
message=bug(612),
subject="ecmascript-regex",
description='zero-width whitespace does not match',
)(test) or skip(
message=bug(612),
subject="ecmascript-regex",
description='latin-1 e-acute matches (unlike e.g. Python)',
)(test) or skip(
message=bug(612),
subject="ecmascript-regex",
description='latin-1 e-acute does not match (unlike e.g. Python)',
)(test) or skip(
message=bug(612),
subject="ecmascript-regex",
description='matches in Python, but should not in jsonschema',
)(test) or skip(
message=bug(612),
subject="ecmascript-regex",
description='does not match',
)(test) or skip(
message=bug(612),
subject="ecmascript-regex",
description='matches',
)(test)


TestDraft3 = DRAFT3.to_unittest_testcase(
DRAFT3.tests(),
DRAFT3.format_tests(),
Expand Down Expand Up @@ -462,16 +406,14 @@ def ecmascript_regex_validation(test):
TestDraft202012 = DRAFT202012.to_unittest_testcase(
DRAFT202012.tests(),
DRAFT202012.optional_tests_of(name="bignum"),
DRAFT202012.optional_tests_of(name="ecmascript-regex"),
DRAFT202012.optional_tests_of(name="float-overflow"),
DRAFT202012.optional_tests_of(name="non-bmp-regex"),
DRAFT202012.optional_tests_of(name="refOfUnknownKeyword"),
Validator=Draft202012Validator,
skip=lambda test: (
narrow_unicode_build(test)
or ecmascript_regex_validation(test)
or skip(
message="ToDo: Extend validation",
message="Issue: Resolving of dynamicRef based on dynamic scope",
subject="dynamicRef",
case_description="A $dynamicRef that initially resolves to a "
"schema with a matching $dynamicAnchor should "
Expand All @@ -480,22 +422,22 @@ def ecmascript_regex_validation(test):
description='The recursive part is not valid against the root',
)(test)
or skip(
message="ToDo: Extend validation",
message="Issue: Resolving of dynamicRef based on dynamic scope",
subject="dynamicRef",
case_description="multiple dynamic paths to the $dynamicRef "
"keyword",
description="recurse to integerNode - floats are not allowed",
)(test)
or skip(
message="ToDo: Extend validation",
message="Issue: Resolving of dynamicRef based on dynamic scope",
subject="dynamicRef",
case_description="after leaving a dynamic scope, it should not be "
"used by a $dynamicRef",
description="/then/$defs/thingy is the final stop for the "
"$dynamicRef",
)(test)
or skip(
message="ToDo: Extend validation",
message="Issue: Resolving of dynamicRef based on dynamic scope",
subject="dynamicRef",
case_description="after leaving a dynamic scope, it should not be "
'used by a $dynamicRef',
Expand Down

0 comments on commit 4547b2a

Please sign in to comment.