Merge pull request #6084 from blueyed/merge-rm
tests: merge/remove test_dontreadfrominput_buffer_python3
This commit is contained in:
commit
eb4b3ce1c8
|
@ -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+")
|
||||
|
|
Loading…
Reference in New Issue