@@ -262,23 +262,23 @@ def test_as_contextmanager(self) -> None:
262262 with pytest .warns (RuntimeWarning ):
263263 warnings .warn ("user" , UserWarning )
264264 excinfo .match (
265- r"DID NOT WARN. No warnings of type \(.+RuntimeWarning.+,\) were emitted. \n"
265+ r"DID NOT WARN. No warnings of type \(.+RuntimeWarning.+,\) were emitted.\n"
266266 r"The list of emitted warnings is: \[UserWarning\('user',?\)\]."
267267 )
268268
269269 with pytest .raises (pytest .fail .Exception ) as excinfo :
270270 with pytest .warns (UserWarning ):
271271 warnings .warn ("runtime" , RuntimeWarning )
272272 excinfo .match (
273- r"DID NOT WARN. No warnings of type \(.+UserWarning.+,\) were emitted. \n"
273+ r"DID NOT WARN. No warnings of type \(.+UserWarning.+,\) were emitted.\n"
274274 r"The list of emitted warnings is: \[RuntimeWarning\('runtime',?\)]."
275275 )
276276
277277 with pytest .raises (pytest .fail .Exception ) as excinfo :
278278 with pytest .warns (UserWarning ):
279279 pass
280280 excinfo .match (
281- r"DID NOT WARN. No warnings of type \(.+UserWarning.+,\) were emitted. \n"
281+ r"DID NOT WARN. No warnings of type \(.+UserWarning.+,\) were emitted.\n"
282282 r"The list of emitted warnings is: \[\]."
283283 )
284284
@@ -290,7 +290,7 @@ def test_as_contextmanager(self) -> None:
290290
291291 messages = [each .message for each in warninfo ]
292292 expected_str = (
293- f"DID NOT WARN. No warnings of type { warning_classes } were emitted. \n "
293+ f"DID NOT WARN. No warnings of type { warning_classes } were emitted.\n "
294294 f"The list of emitted warnings is: { messages } ."
295295 )
296296
0 commit comments