summaryrefslogtreecommitdiff
path: root/testing/test_recwarn.py
diff options
context:
space:
mode:
authorRonny Pfannschmidt <ronny.pfannschmidt@redhat.com>2016-10-19 08:57:24 +0200
committerRonny Pfannschmidt <ronny.pfannschmidt@redhat.com>2016-10-24 15:23:53 +0200
commite9668d75b80057441b53c65c84c9a6351b6c87cb (patch)
tree33762178e9eda4512b33c53e458fdebad9af6523 /testing/test_recwarn.py
parent377e649e615f36e6c526dceb8249211633952cce (diff)
downloadpytest-e9668d75b80057441b53c65c84c9a6351b6c87cb.tar.gz
turn RecordedWarning into a namedtuple
fixes #2013
Diffstat (limited to 'testing/test_recwarn.py')
-rw-r--r--testing/test_recwarn.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/testing/test_recwarn.py b/testing/test_recwarn.py
index 87e5846c2..36be5d0d2 100644
--- a/testing/test_recwarn.py
+++ b/testing/test_recwarn.py
@@ -203,6 +203,9 @@ class TestWarns(object):
assert len(record) == 1
assert str(record[0].message) == "user"
+ print(repr(record[0]))
+ assert str(record[0].message) in repr(record[0])
+
def test_record_only(self):
with pytest.warns(None) as record:
warnings.warn("user", UserWarning)