Skip to content

Commit ff88a88

Browse files
committed
Add test case for 595.
I want to show that captured stdout is not shown in the report when the test is skipped.
1 parent 33796c8 commit ff88a88

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

testing/test_junitxml.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,19 @@ def test_skip():
249249
snode = tnode.find_first_by_tag("skipped")
250250
snode.assert_attr(type="pytest.skip", message="hello25", )
251251

252+
253+
def test_mark_skip_doesnt_capture_output(self, testdir):
254+
testdir.makepyfile("""
255+
import pytest
256+
@pytest.mark.skip(reason="foo")
257+
def test_skip():
258+
print("bar!")
259+
""")
260+
result, dom = runandparse(testdir)
261+
assert result.ret == 0
262+
node = dom.find_first_by_tag("testsuite")
263+
assert not node.find_first_by_tag("system-out")
264+
252265
def test_classname_instance(self, testdir):
253266
testdir.makepyfile("""
254267
class TestClass:

0 commit comments

Comments
 (0)