Issue #15204: Silence and check the 'U' mode deprecation warnings in tests.

Changed deprecation message in the fileinput module.
This commit is contained in:
Serhiy Storchaka 2013-11-24 23:13:26 +02:00
parent ed8c906127
commit 2480c2ed59
5 changed files with 33 additions and 13 deletions

View file

@ -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)