diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-03-31 08:25:59 +0000 |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-03-31 08:25:59 +0000 |
commit | c7388039848c599e930620c8f544f18b1ae7187d (patch) | |
tree | 0569f16bc4d086576e4a845bb14792916a400801 /Lib/test/test_io.py | |
parent | 750bbb301975bc327fe5f4fcdf0cc9e1953a56d5 (diff) | |
parent | 3d50f38849cb50ac6366dd38c93d21631e4fc844 (diff) | |
download | cpython-c7388039848c599e930620c8f544f18b1ae7187d.tar.gz |
Issue #22854: Merge UnsupportedOperation fixes from 3.5
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 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): |