Skip to content

Commit c480ceb

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e48515b commit c480ceb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

testing/python/raises.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,10 @@ def test_match_failure_string_quoting(self):
289289
with pytest.raises(AssertionError, match="'foo"):
290290
raise AssertionError("'bar")
291291
(msg,) = excinfo.value.args
292-
assert msg == '''Regex pattern did not match.\n Expected regex: "'foo"\n Actual message: "'bar"'''
292+
assert (
293+
msg
294+
== '''Regex pattern did not match.\n Expected regex: "'foo"\n Actual message: "'bar"'''
295+
)
293296

294297
def test_match_failure_exact_string_message(self):
295298
message = "Oh here is a message with (42) numbers in parameters"

testing/python/raises_group.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,9 @@ def test_raisesexc() -> None:
11201120
# currently RaisesGroup says "Raised exception did not match" but RaisesExc doesn't...
11211121
with pytest.raises(
11221122
AssertionError,
1123-
match=wrap_escape("Regex pattern did not match.\n Expected regex: 'foo'\n Actual message: 'bar'"),
1123+
match=wrap_escape(
1124+
"Regex pattern did not match.\n Expected regex: 'foo'\n Actual message: 'bar'"
1125+
),
11241126
):
11251127
with RaisesExc(TypeError, match="foo"):
11261128
raise TypeError("bar")

0 commit comments

Comments
 (0)