Skip to content

Commit 8c81722

Browse files
authored
Merge pull request #3167 from nicoddemus/fix-py37
Fix test for py37
2 parents 89a55d8 + 90a8faa commit 8c81722

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
@@ -206,13 +206,13 @@ def test_as_contextmanager(self):
206206
with pytest.warns(RuntimeWarning):
207207
warnings.warn("user", UserWarning)
208208
excinfo.match(r"DID NOT WARN. No warnings of type \(.+RuntimeWarning.+,\) was emitted. "
209-
r"The list of emitted warnings is: \[UserWarning\('user',\)\].")
209+
r"The list of emitted warnings is: \[UserWarning\('user',?\)\].")
210210

211211
with pytest.raises(pytest.fail.Exception) as excinfo:
212212
with pytest.warns(UserWarning):
213213
warnings.warn("runtime", RuntimeWarning)
214214
excinfo.match(r"DID NOT WARN. No warnings of type \(.+UserWarning.+,\) was emitted. "
215-
r"The list of emitted warnings is: \[RuntimeWarning\('runtime',\)\].")
215+
r"The list of emitted warnings is: \[RuntimeWarning\('runtime',?\)\].")
216216

217217
with pytest.raises(pytest.fail.Exception) as excinfo:
218218
with pytest.warns(UserWarning):

0 commit comments

Comments
 (0)