File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff 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" )
You can’t perform that action at this time.
0 commit comments