some special handling of stdin capturing, unification, un-xfail the win32 test

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-05-18 12:12:34 -07:00
parent 10296faff1
commit cf255cd643
2 changed files with 19 additions and 31 deletions

View File

@@ -372,15 +372,6 @@ class TestStdCaptureFDinvalidFD:
os.close(2)
cap = py.io.StdCaptureFD(out=False, err=True, in_=False)
cap.done()
""")
result = testdir.runpytest("--capture=fd")
assert result.ret == 0
assert result.parseoutcomes()['passed'] == 2
@py.test.mark.xfail("sys.platform == 'win32'", run=False)
def test_stdcapture_fd_invalid_fd_null(self, testdir):
testdir.makepyfile("""
import py, os
def test_stdin():
os.close(0)
cap = py.io.StdCaptureFD(out=False, err=False, in_=True)
@@ -388,8 +379,7 @@ class TestStdCaptureFDinvalidFD:
""")
result = testdir.runpytest("--capture=fd")
assert result.ret == 0
assert result.parseoutcomes()['passed'] == 1
assert result.parseoutcomes()['passed'] == 3
def test_capture_not_started_but_reset():
capsys = py.io.StdCapture(now=False)