add close method to DontReadFromInput so multiprocessing can close it
--HG-- branch : trunk
This commit is contained in:
parent
962d0fe2be
commit
b3ce06bbf9
|
@ -334,6 +334,8 @@ class DontReadFromInput:
|
|||
raise ValueError("redirected Stdin is pseudofile, has no fileno()")
|
||||
def isatty(self):
|
||||
return False
|
||||
def close(self):
|
||||
pass
|
||||
|
||||
try:
|
||||
devnullpath = os.devnull
|
||||
|
|
|
@ -66,6 +66,7 @@ def test_dontreadfrominput():
|
|||
py.test.raises(IOError, f.readlines)
|
||||
py.test.raises(IOError, iter, f)
|
||||
py.test.raises(ValueError, f.fileno)
|
||||
f.close() # just for completeness
|
||||
|
||||
def pytest_funcarg__tmpfile(request):
|
||||
testdir = request.getfuncargvalue("testdir")
|
||||
|
|
Loading…
Reference in New Issue