summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-01-19 15:11:51 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-01-19 15:11:51 (GMT)
commit806d4029ed3d6adca2effe5b3b2fd461b300aebb (patch)
tree40c102cce986df99ace78d8e1d65d43df18151b4 /Lib/test
parentd994864d54ffd2f607af3a9eecfbadd75502efd3 (diff)
downloadcpython-806d4029ed3d6adca2effe5b3b2fd461b300aebb.zip
cpython-806d4029ed3d6adca2effe5b3b2fd461b300aebb.tar.gz
cpython-806d4029ed3d6adca2effe5b3b2fd461b300aebb.tar.bz2
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 ........
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_fileio.py4
1 files changed, 4 insertions, 0 deletions
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 @@ class OtherFileTests(unittest.TestCase):
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"