Skip to content

Commit 7db2330

Browse files
userwarning repr on python3.6 adds a comma
1 parent c727716 commit 7db2330

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testing/test_recwarn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,15 @@ def test_as_contextmanager(self) -> None:
263263
warnings.warn("user", UserWarning)
264264
excinfo.match(
265265
r"DID NOT WARN. No warnings of type \(.+RuntimeWarning.+,\) were emitted. \n"
266-
r"The list of emitted warnings is: \[UserWarning\('user'\)\]."
266+
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(
273273
r"DID NOT WARN. No warnings of type \(.+UserWarning.+,\) were emitted. \n"
274-
r"The list of emitted warnings is: \[RuntimeWarning\('runtime'\)]."
274+
r"The list of emitted warnings is: \[RuntimeWarning\('runtime',?\)]."
275275
)
276276

277277
with pytest.raises(pytest.fail.Exception) as excinfo:

0 commit comments

Comments
 (0)