@@ -262,23 +262,23 @@ def test_as_contextmanager(self) -> None:
262
262
with pytest .warns (RuntimeWarning ):
263
263
warnings .warn ("user" , UserWarning )
264
264
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"
266
266
r"The list of emitted warnings is: \[UserWarning\('user',?\)\]."
267
267
)
268
268
269
269
with pytest .raises (pytest .fail .Exception ) as excinfo :
270
270
with pytest .warns (UserWarning ):
271
271
warnings .warn ("runtime" , RuntimeWarning )
272
272
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"
274
274
r"The list of emitted warnings is: \[RuntimeWarning\('runtime',?\)]."
275
275
)
276
276
277
277
with pytest .raises (pytest .fail .Exception ) as excinfo :
278
278
with pytest .warns (UserWarning ):
279
279
pass
280
280
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"
282
282
r"The list of emitted warnings is: \[\]."
283
283
)
284
284
@@ -290,7 +290,7 @@ def test_as_contextmanager(self) -> None:
290
290
291
291
messages = [each .message for each in warninfo ]
292
292
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 "
294
294
f"The list of emitted warnings is: { messages } ."
295
295
)
296
296
0 commit comments