diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-01-19 00:08:08 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-01-19 00:08:08 (GMT) |
commit | 5848d1ff35f8606b1678ff8cc29011b8fd4ef486 (patch) | |
tree | d1607015545ad0de2967543397e0e33d9ee5d81e /Lib | |
parent | b6e112bd952c2023b95212364ed07ad9c235da41 (diff) | |
download | cpython-5848d1ff35f8606b1678ff8cc29011b8fd4ef486.zip cpython-5848d1ff35f8606b1678ff8cc29011b8fd4ef486.tar.gz cpython-5848d1ff35f8606b1678ff8cc29011b8fd4ef486.tar.bz2 |
raise an OSError for invalid fds #4991
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_fileio.py | 4 |
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" |