Skip to content

Commit

Permalink
Merge pull request #2091 from lwm/move-595-along
Browse files Browse the repository at this point in the history
Add test case for #595.
  • Loading branch information
nicoddemus authored Nov 27, 2016
2 parents 58f28bf + 6c54756 commit 1e97ea6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions testing/test_junitxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,18 @@ def test_skip():
snode = tnode.find_first_by_tag("skipped")
snode.assert_attr(type="pytest.skip", message="hello25", )

def test_mark_skip_doesnt_capture_output(self, testdir):
testdir.makepyfile("""
import pytest
@pytest.mark.skip(reason="foo")
def test_skip():
print("bar!")
""")
result, dom = runandparse(testdir)
assert result.ret == 0
node_xml = dom.find_first_by_tag("testsuite").toxml()
assert "bar!" not in node_xml

def test_classname_instance(self, testdir):
testdir.makepyfile("""
class TestClass:
Expand Down

0 comments on commit 1e97ea6

Please sign in to comment.