Skip to content

Commit 3b00143

Browse files
[fix] check error message in pytest correctly
1 parent a0e7db5 commit 3b00143

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tests/test_examples.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def consistent(json_string, allow):
117117
res = fix(json_string, allow)
118118
return res == fix_fast(json_string, allow)
119119
except PartialJSON as err:
120-
with raises(PartialJSON, match=str(err)):
120+
with raises(PartialJSON, match=f"^{err}$"):
121121
fix_fast(json_string, allow)
122122
return True
123123

0 commit comments

Comments
 (0)