Skip to content

Commit 204c0c6

Browse files
committed
Add an explicit test for #611.
1 parent 7ee391c commit 204c0c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

jsonschema/tests/test_validators.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,12 @@ def test_is_type_evades_bool_inheriting_from_int(self):
11821182
def test_string_a_bytestring_is_a_string(self):
11831183
self.Validator({"type": "string"}).validate(b"foo")
11841184

1185+
def test_patterns_can_be_native_strings(self):
1186+
"""
1187+
See https://github.com/Julian/jsonschema/issues/611.
1188+
"""
1189+
self.Validator({"pattern": "foo"}).validate("foo")
1190+
11851191
def test_it_can_validate_with_decimals(self):
11861192
schema = {"items": {"type": "number"}}
11871193
Validator = validators.extend(

0 commit comments

Comments
 (0)