summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fileio.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_fileio.py')
-rw-r--r--Lib/test/test_fileio.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
index 69aa3fd..497914f 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -6,7 +6,8 @@ import unittest
from array import array
from weakref import proxy
-from test.support import TESTFN, findfile, check_warnings, run_unittest
+from test.support import (TESTFN, findfile, check_warnings, run_unittest,
+ make_bad_fd)
from collections import UserList
import _fileio
@@ -177,7 +178,7 @@ class OtherFileTests(unittest.TestCase):
def testInvalidFd(self):
self.assertRaises(ValueError, _fileio._FileIO, -10)
- self.assertRaises(OSError, _fileio._FileIO, 10)
+ self.assertRaises(OSError, _fileio._FileIO, make_bad_fd())
def testBadModeArgument(self):
# verify that we get a sensible error message for bad mode argument