diff options
author | Julian Berman <Julian@GrayVines.com> | 2019-09-22 12:57:39 -0400 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2019-09-22 12:57:39 -0400 |
commit | d89333bebdb5768ccf5a0d86d9f1379f91c067e6 (patch) | |
tree | b7bfc90b9dfb45285bcd3b5d949c02088dba6894 /jsonschema/tests/test_validators.py | |
parent | 694f883aad6d6a31083229fa47a4e27658075622 (diff) | |
download | jsonschema-d89333bebdb5768ccf5a0d86d9f1379f91c067e6.tar.gz |
Moved upstream via json-schema-org/JSON-Schema-Test-Suite#277.
Diffstat (limited to 'jsonschema/tests/test_validators.py')
-rw-r--r-- | jsonschema/tests/test_validators.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/jsonschema/tests/test_validators.py b/jsonschema/tests/test_validators.py index 42720cc..6b446de 100644 --- a/jsonschema/tests/test_validators.py +++ b/jsonschema/tests/test_validators.py @@ -1348,35 +1348,6 @@ class TestDraft7Validator(ValidatorTestMixin, TestCase): invalid = {"type": "integer"}, "foo" -class TestBuiltinFormats(TestCase): - """ - The built-in (specification-defined) formats do not raise type errors. - - If an instance or value is not a string, it should be ignored. - """ - - # These tests belong upstream. - # See https://github.com/json-schema-org/JSON-Schema-Test-Suite/issues/246 - - -for Validator, checker in ( - (validators.Draft3Validator, jsonschema.draft3_format_checker), - (validators.Draft4Validator, jsonschema.draft4_format_checker), - (validators.Draft6Validator, jsonschema.draft6_format_checker), - (validators.Draft7Validator, jsonschema.draft7_format_checker), -): - for format in checker.checkers: - def test(self, checker=checker, format=format): - validator = Validator({"format": format}, format_checker=checker) - validator.validate(123) - - name = "test_{}_{}_ignores_non_strings".format( - Validator.__name__, format, - ) - test.__name__ = name - setattr(TestBuiltinFormats, name, test) - - class TestValidatorFor(SynchronousTestCase): def test_draft_3(self): schema = {"$schema": "http://json-schema.org/draft-03/schema"} |