tests: merge/remove test_dontreadfrominput_buffer_python3

This commit is contained in:
Daniel Hahler 2019-10-27 19:30:41 +01:00
parent cbc39dd86e
commit 820b747e7a
1 changed files with 1 additions and 14 deletions

View File

@ -826,6 +826,7 @@ def test_dontreadfrominput():
from _pytest.capture import DontReadFromInput
f = DontReadFromInput()
assert f.buffer is f
assert not f.isatty()
pytest.raises(IOError, f.read)
pytest.raises(IOError, f.readlines)
@ -835,20 +836,6 @@ def test_dontreadfrominput():
f.close() # just for completeness
def test_dontreadfrominput_buffer_python3():
from _pytest.capture import DontReadFromInput
f = DontReadFromInput()
fb = f.buffer
assert not fb.isatty()
pytest.raises(IOError, fb.read)
pytest.raises(IOError, fb.readlines)
iter_f = iter(f)
pytest.raises(IOError, next, iter_f)
pytest.raises(ValueError, fb.fileno)
f.close() # just for completeness
@pytest.fixture
def tmpfile(testdir):
f = testdir.makepyfile("").open("wb+")