summaryrefslogtreecommitdiff
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r--Lib/test/test_io.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 51c250b40b..1944a04573 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -468,7 +468,11 @@ class IOTest(unittest.TestCase):
def test_open_handles_NUL_chars(self):
fn_with_NUL = 'foo\0bar'
self.assertRaises(ValueError, self.open, fn_with_NUL, 'w')
- self.assertRaises(ValueError, self.open, bytes(fn_with_NUL, 'ascii'), 'w')
+
+ bytes_fn = bytes(fn_with_NUL, 'ascii')
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore", DeprecationWarning)
+ self.assertRaises(ValueError, self.open, bytes_fn, 'w')
def test_raw_file_io(self):
with self.open(support.TESTFN, "wb", buffering=0) as f:
@@ -3173,8 +3177,7 @@ class CTextIOWrapperTest(TextIOWrapperTest):
class PyTextIOWrapperTest(TextIOWrapperTest):
io = pyio
- #shutdown_error = "LookupError: unknown encoding: ascii"
- shutdown_error = "TypeError: 'NoneType' object is not iterable"
+ shutdown_error = "LookupError: unknown encoding: ascii"
class IncrementalNewlineDecoderTest(unittest.TestCase):