summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fileio.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-04 21:24:42 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-04 21:24:42 (GMT)
commite6ebcdaa54d2527b1ae94fd95f5ee96dfdc9abe4 (patch)
tree24dd6c9860a9b55db398b8ed3b3b1e9b086bc6b1 /Lib/test/test_fileio.py
parentdca9de97b4256c8aad8a423d6f1d889d2bae9b3d (diff)
downloadcpython-e6ebcdaa54d2527b1ae94fd95f5ee96dfdc9abe4.zip
cpython-e6ebcdaa54d2527b1ae94fd95f5ee96dfdc9abe4.tar.gz
cpython-e6ebcdaa54d2527b1ae94fd95f5ee96dfdc9abe4.tar.bz2
Merged revisions 84506 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84506 | antoine.pitrou | 2010-09-04 22:53:29 +0200 (sam., 04 sept. 2010) | 5 lines Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file descriptor is provided. Patch by Pascal Chambon. ........
Diffstat (limited to 'Lib/test/test_fileio.py')
-rw-r--r--Lib/test/test_fileio.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
index 930b654..2760b73 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -312,6 +312,9 @@ class OtherFileTests(unittest.TestCase):
def testInvalidFd(self):
self.assertRaises(ValueError, _FileIO, -10)
self.assertRaises(OSError, _FileIO, make_bad_fd())
+ if sys.platform == 'win32':
+ import msvcrt
+ self.assertRaises(IOError, msvcrt.get_osfhandle, make_bad_fd())
def testBadModeArgument(self):
# verify that we get a sensible error message for bad mode argument