Improve test_rewarn_functional
This commit is contained in:
parent
2e0a7cf78d
commit
4592def14d
|
@ -7,7 +7,7 @@ from _pytest.recwarn import WarningsRecorder
|
||||||
|
|
||||||
|
|
||||||
def test_recwarn_functional(testdir):
|
def test_recwarn_functional(testdir):
|
||||||
reprec = testdir.inline_runsource(
|
testdir.makepyfile(
|
||||||
"""
|
"""
|
||||||
import warnings
|
import warnings
|
||||||
def test_method(recwarn):
|
def test_method(recwarn):
|
||||||
|
@ -16,8 +16,8 @@ def test_recwarn_functional(testdir):
|
||||||
assert isinstance(warn.message, UserWarning)
|
assert isinstance(warn.message, UserWarning)
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
res = reprec.countoutcomes()
|
reprec = testdir.inline_run()
|
||||||
assert tuple(res) == (1, 0, 0), res
|
reprec.assertoutcome(passed=1)
|
||||||
|
|
||||||
|
|
||||||
class TestWarningsRecorderChecker(object):
|
class TestWarningsRecorderChecker(object):
|
||||||
|
|
Loading…
Reference in New Issue