mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Issue 9856: Change object.__format__ with a non-empty format string from a PendingDeprecationWarning to a DeprecationWarning.
This commit is contained in:
parent
e4f6a80ed8
commit
b9cd3531c4
4 changed files with 21 additions and 17 deletions
|
@ -614,7 +614,7 @@ class UnicodeTest(string_tests.CommonTest,
|
|||
self.assertEqual('{0!s}'.format(G('data')), 'string is data')
|
||||
|
||||
msg = 'object.__format__ with a non-empty format string is deprecated'
|
||||
with support.check_warnings((msg, PendingDeprecationWarning)):
|
||||
with support.check_warnings((msg, DeprecationWarning)):
|
||||
self.assertEqual('{0:^10}'.format(E('data')), ' E(data) ')
|
||||
self.assertEqual('{0:^10s}'.format(E('data')), ' E(data) ')
|
||||
self.assertEqual('{0:>15s}'.format(G('data')), ' string is data')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue