Test pytest.skip in doctest
This commit is contained in:
parent
43aee15ba3
commit
fa3cca51e1
|
@ -188,6 +188,18 @@ class TestDoctests(object):
|
|||
]
|
||||
)
|
||||
|
||||
def test_doctest_skip(self, testdir):
|
||||
testdir.maketxtfile(
|
||||
"""
|
||||
>>> 1
|
||||
1
|
||||
>>> import pytest
|
||||
>>> pytest.skip("")
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest("--doctest-modules")
|
||||
result.stdout.fnmatch_lines(["*1 skipped*"])
|
||||
|
||||
def test_docstring_partial_context_around_error(self, testdir):
|
||||
"""Test that we show some context before the actual line of a failing
|
||||
doctest.
|
||||
|
|
Loading…
Reference in New Issue