mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #15204: Silence and check the 'U' mode deprecation warnings in tests.
Changed deprecation message in the fileinput module.
This commit is contained in:
parent
ed8c906127
commit
2480c2ed59
5 changed files with 33 additions and 13 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue