Merge pull request #6084 from blueyed/merge-rm

tests: merge/remove test_dontreadfrominput_buffer_python3
This commit is contained in:
Daniel Hahler 2019-11-06 13:24:47 +01:00 committed by GitHub
commit eb4b3ce1c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 14 deletions

View File

@ -822,6 +822,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)
@ -831,20 +832,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+")