xfailing test for issue 412

This commit is contained in:
Ronny Pfannschmidt 2014-03-27 13:53:59 +01:00
parent 42e0d7970c
commit b18040337a
2 changed files with 20 additions and 0 deletions

View File

@ -9,6 +9,7 @@ lib/
bin/
include/
.Python/
.env/
# These lines are suggested according to the svn:ignore property
# Feel free to enable them by uncommenting them
@ -27,6 +28,7 @@ dist/
*.egg-info
issue/
env/
env3/
3rdparty/
.tox
.cache

View File

@ -533,6 +533,24 @@ def test_capture_conftest_runtest_setup(testdir):
assert 'hello19' not in result.stdout.str()
@pytest.mark.xfail(reason='demonstrate #412')
def test_capture_badoutput(testdir):
testdir.makepyfile("""
import os
def test_func():
omg = bytearray([1,129,1])
os.write(1, omg)
assert 0
""")
result = testdir.runpytest('--cap=fd')
#this fails on python3 - fnmatch first for debugging
result.stdout.fnmatch_lines([
'*1 failed*',
])
assert result.ret == 1
def test_capture_early_option_parsing(testdir):
testdir.makeconftest("""
def pytest_runtest_setup():