diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-24 21:13:26 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-24 21:13:26 (GMT) |
commit | 2480c2ed593a164fe3a4821a13d5867a0a7102ed (patch) | |
tree | e33efad894bf91e221465d7ce251531ea01d6319 /Lib/test/test_io.py | |
parent | ed8c9061270b619de1d603ac34502b41cc84822f (diff) | |
download | cpython-2480c2ed593a164fe3a4821a13d5867a0a7102ed.zip cpython-2480c2ed593a164fe3a4821a13d5867a0a7102ed.tar.gz cpython-2480c2ed593a164fe3a4821a13d5867a0a7102ed.tar.bz2 |
Issue #15204: Silence and check the 'U' mode deprecation warnings in tests.
Changed deprecation message in the fileinput module.
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r-- | Lib/test/test_io.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index c1ea6f2..57f3659 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -2777,7 +2777,8 @@ class MiscIOTest(unittest.TestCase): self.assertEqual(f.mode, "wb") f.close() - f = self.open(support.TESTFN, "U") + with support.check_warnings(('', DeprecationWarning)): + f = self.open(support.TESTFN, "U") self.assertEqual(f.name, support.TESTFN) self.assertEqual(f.buffer.name, support.TESTFN) self.assertEqual(f.buffer.raw.name, support.TESTFN) |