diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-28 14:48:19 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-28 14:48:19 +0300 |
commit | f5a86603829104d675112c1aa35f4a7bdd32110e (patch) | |
tree | f3427e72d0382510cc719e3817782ae290ab91ad /Lib/test/test_io.py | |
parent | 95de54494fb75a30f417c5bba1d0db4d54f57d29 (diff) | |
parent | c7aaeb9022c01fbc190a6c6eb9df9cf7b0c14347 (diff) | |
download | cpython-f5a86603829104d675112c1aa35f4a7bdd32110e.tar.gz |
Issue #27138: Regenerate Python/importlib_external.h.
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r-- | Lib/test/test_io.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 73231981ad..53e776d910 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -496,7 +496,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: @@ -3228,8 +3232,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): |