Skip to content

Commit 5b0e318

Browse files
committed
Test .errors propagation for SchemaError.
1 parent 770c0a0 commit 5b0e318

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests.py

+7
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,13 @@ def test_string_types_deprecated(self):
642642
validate("foo", {"type" : "string"}, string_types=(unicode,))
643643
self.assertEqual(len(w), 1)
644644

645+
def test_schema_error_errors(self):
646+
try:
647+
validate({}, { "properties": { "additionalProperties": False } }, stop_on_error=False)
648+
except SchemaError as e:
649+
self.assertGreater(len(e.errors), 0)
650+
else:
651+
raise AssertionError("Expected SchemaError, got nothing")
645652

646653
class TestIgnorePropertiesForIrrelevantTypes(unittest.TestCase):
647654
def test_minimum(self):

0 commit comments

Comments
 (0)