summaryrefslogtreecommitdiff
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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
index b87dc07805..41be95e04f 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -361,8 +361,8 @@ class OtherFileTests(unittest.TestCase):
def testConstructorHandlesNULChars(self):
fn_with_NUL = 'foo\0bar'
- self.assertRaises(TypeError, _FileIO, fn_with_NUL, 'w')
- self.assertRaises(TypeError, _FileIO, bytes(fn_with_NUL, 'ascii'), 'w')
+ self.assertRaises(ValueError, _FileIO, fn_with_NUL, 'w')
+ self.assertRaises(ValueError, _FileIO, bytes(fn_with_NUL, 'ascii'), 'w')
def testInvalidFd(self):
self.assertRaises(ValueError, _FileIO, -10)