Skip to content

Commit fad645f

Browse files
committed
Actually exercise Validator.is_type on an unknown type.
1 parent bb75153 commit fad645f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

jsonschema/tests/test_types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,8 @@ def test_object_extensions_can_handle_custom_validators(self):
190190

191191
with self.assertRaises(ValidationError):
192192
validator.validate(Point(x="not an integer", y=5))
193+
194+
def test_unknown_type(self):
195+
with self.assertRaises(UnknownType) as e:
196+
Draft4Validator({}).is_type(12, "some unknown type")
197+
self.assertIn("'some unknown type'", str(e.exception))

0 commit comments

Comments
 (0)