summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-01-19 15:59:36 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-01-19 15:59:36 (GMT)
commit61b8e940f38feeb23035e67f2b79c433417cb088 (patch)
tree799649a23961cc604fa6383ed3e7fd50810303af /Lib/test
parentf5def21ce7c826deae66bdc7ebb3b3e5ea8dd09d (diff)
downloadcpython-61b8e940f38feeb23035e67f2b79c433417cb088.zip
cpython-61b8e940f38feeb23035e67f2b79c433417cb088.tar.gz
cpython-61b8e940f38feeb23035e67f2b79c433417cb088.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 d8cf415..c089608 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -176,6 +176,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"