tests: merge/remove test_dontreadfrominput_buffer_python3
This commit is contained in:
		
							parent
							
								
									cbc39dd86e
								
							
						
					
					
						commit
						820b747e7a
					
				| 
						 | 
					@ -826,6 +826,7 @@ def test_dontreadfrominput():
 | 
				
			||||||
    from _pytest.capture import DontReadFromInput
 | 
					    from _pytest.capture import DontReadFromInput
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    f = DontReadFromInput()
 | 
					    f = DontReadFromInput()
 | 
				
			||||||
 | 
					    assert f.buffer is f
 | 
				
			||||||
    assert not f.isatty()
 | 
					    assert not f.isatty()
 | 
				
			||||||
    pytest.raises(IOError, f.read)
 | 
					    pytest.raises(IOError, f.read)
 | 
				
			||||||
    pytest.raises(IOError, f.readlines)
 | 
					    pytest.raises(IOError, f.readlines)
 | 
				
			||||||
| 
						 | 
					@ -835,20 +836,6 @@ def test_dontreadfrominput():
 | 
				
			||||||
    f.close()  # just for completeness
 | 
					    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
 | 
					@pytest.fixture
 | 
				
			||||||
def tmpfile(testdir):
 | 
					def tmpfile(testdir):
 | 
				
			||||||
    f = testdir.makepyfile("").open("wb+")
 | 
					    f = testdir.makepyfile("").open("wb+")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue