diff options
author | Daniel Hahler <git@thequod.de> | 2019-03-24 11:04:05 +0100 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2019-03-24 11:05:00 +0100 |
commit | 3127ec737b107466654680ad785863b7c044d0da (patch) | |
tree | 2215e41f2ba44447a5f63d89acaba926158e3452 /testing/test_session.py | |
parent | b3319a6074636eb651063bff7eec69ec289f1df5 (diff) | |
download | pytest-3127ec737b107466654680ad785863b7c044d0da.tar.gz |
Fix pytest's own tests with `-W error::ResourceWarning`
Diffstat (limited to 'testing/test_session.py')
-rw-r--r-- | testing/test_session.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/testing/test_session.py b/testing/test_session.py index 6b185f76b..6f01bd3bf 100644 --- a/testing/test_session.py +++ b/testing/test_session.py @@ -116,7 +116,8 @@ class SessionTests(object): class TestBrokenClass(object): def test_explicit_bad_repr(self): t = BrokenRepr1() - pytest.raises(Exception, 'repr(t)') + with pytest.raises(Exception, match="I'm a broken repr"): + repr(t) def test_implicit_bad_repr1(self): t = BrokenRepr1() |