@@ -160,8 +160,8 @@ def test_non_validation_validator_errors(self):
160160 with self .assertRaisesRegex (TypeError , err_msg ):
161161 run_validator (schema_file = test_file , data = {})
162162
163- # invalid jsonpointer string - note the grammar error is from jsonpointer
164- err_str = "location must starts with /"
163+ # invalid jsonpointer string
164+ err_str = "Location must start with /"
165165 json_loc = "start validating here"
166166 with self .assertRaisesRegex (JsonPointerException , err_str ):
167167 run_validator (schema = test_schema , data = {}, validate_at = json_loc )
@@ -271,7 +271,7 @@ def test_pattern_validation(self, schema_arg=None, schema_file_arg=None):
271271 "distance" : 3 ,
272272 },
273273 "file" : "invalid_pattern" ,
274- "err_str" : '"what\' s-the-problem with-this-string\?" does not match .*?' ,
274+ "err_str" : r '"what\'s-the-problem with-this-string\?" does not match .*?' ,
275275 },
276276 {
277277 "input" : {"name" : "No_problem_with_this_string" , "distance" : 3 },
@@ -309,7 +309,7 @@ def test_uri_validation(self, schema_arg=None, schema_file_arg=None):
309309 {
310310 "input" : {"name" : "invalid_uri" , "home_page" : "where is it?" },
311311 "file" : "invalid_uri" ,
312- "err_str" : "'where is it\?' is not a 'uri'" ,
312+ "err_str" : r "'where is it\?' is not a 'uri'" ,
313313 },
314314 ]
315315
@@ -350,7 +350,7 @@ def test_date_format_validation(self, schema_arg=None, schema_file_arg=None):
350350
351351 # pyyaml-specific issue: dates get automatically parsed into datetime objects (doh!)
352352 file_path = os_path .join (json_validation_dir , "unquoted_date.yaml" )
353- err_str = "datetime.date\(2020, 6, 6\) is not of type 'string'"
353+ err_str = r "datetime.date\(2020, 6, 6\) is not of type 'string'"
354354 with self .assertRaisesRegex (ValidationError , err_str ):
355355 run_validator (
356356 schema = schema_arg ,
0 commit comments