summaryrefslogtreecommitdiff
path: root/testing/test_recwarn.py
diff options
context:
space:
mode:
authorBruno Oliveira <nicoddemus@gmail.com>2018-09-04 17:02:56 -0300
committerBruno Oliveira <nicoddemus@gmail.com>2018-09-04 17:02:56 -0300
commit4592def14d63aa32215bea548c53fc208a88fd10 (patch)
treeea03ff1bc21e6477ad2688233ea6debf168b320b /testing/test_recwarn.py
parent2e0a7cf78dff53c534bf4aad2841ba8731051773 (diff)
downloadpytest-4592def14d63aa32215bea548c53fc208a88fd10.tar.gz
Improve test_rewarn_functional
Diffstat (limited to 'testing/test_recwarn.py')
-rw-r--r--testing/test_recwarn.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/testing/test_recwarn.py b/testing/test_recwarn.py
index f81d27889..82bd66c55 100644
--- a/testing/test_recwarn.py
+++ b/testing/test_recwarn.py
@@ -7,7 +7,7 @@ from _pytest.recwarn import WarningsRecorder
def test_recwarn_functional(testdir):
- reprec = testdir.inline_runsource(
+ testdir.makepyfile(
"""
import warnings
def test_method(recwarn):
@@ -16,8 +16,8 @@ def test_recwarn_functional(testdir):
assert isinstance(warn.message, UserWarning)
"""
)
- res = reprec.countoutcomes()
- assert tuple(res) == (1, 0, 0), res
+ reprec = testdir.inline_run()
+ reprec.assertoutcome(passed=1)
class TestWarningsRecorderChecker(object):