Merge pull request #3167 from nicoddemus/fix-py37

Fix test for py37
This commit is contained in:
Bruno Oliveira 2018-02-02 17:13:00 -02:00 committed by GitHub
commit 8c81722a0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -206,13 +206,13 @@ class TestWarns(object):
with pytest.warns(RuntimeWarning):
warnings.warn("user", UserWarning)
excinfo.match(r"DID NOT WARN. No warnings of type \(.+RuntimeWarning.+,\) was emitted. "
r"The list of emitted warnings is: \[UserWarning\('user',\)\].")
r"The list of emitted warnings is: \[UserWarning\('user',?\)\].")
with pytest.raises(pytest.fail.Exception) as excinfo:
with pytest.warns(UserWarning):
warnings.warn("runtime", RuntimeWarning)
excinfo.match(r"DID NOT WARN. No warnings of type \(.+UserWarning.+,\) was emitted. "
r"The list of emitted warnings is: \[RuntimeWarning\('runtime',\)\].")
r"The list of emitted warnings is: \[RuntimeWarning\('runtime',?\)\].")
with pytest.raises(pytest.fail.Exception) as excinfo:
with pytest.warns(UserWarning):