Merged revisions 68755 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68755 | benjamin.peterson | 2009-01-18 18:08:08 -0600 (Sun, 18 Jan 2009) | 1 line
raise an OSError for invalid fds #4991
........
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
index 817103e..69aa3fd 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -175,6 +175,10 @@
f.close()
os.unlink(TESTFN)
+ def testInvalidFd(self):
+ self.assertRaises(ValueError, _fileio._FileIO, -10)
+ self.assertRaises(OSError, _fileio._FileIO, 10)
+
def testBadModeArgument(self):
# verify that we get a sensible error message for bad mode argument
bad_mode = "qwerty"