mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.14] gh-128051: Fix tests if sys.float_repr_style is 'legacy' (GH-135908) (#136025)
gh-128051: Fix tests if sys.float_repr_style is 'legacy' (GH-135908)
(cherry picked from commit f3aec60d7a
)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
a168c77536
commit
33c83cea07
16 changed files with 50 additions and 44 deletions
|
@ -1231,10 +1231,10 @@ class StrTest(string_tests.StringLikeTest,
|
|||
self.assertEqual('{0:\x00^6}'.format(3), '\x00\x003\x00\x00\x00')
|
||||
self.assertEqual('{0:<6}'.format(3), '3 ')
|
||||
|
||||
self.assertEqual('{0:\x00<6}'.format(3.14), '3.14\x00\x00')
|
||||
self.assertEqual('{0:\x01<6}'.format(3.14), '3.14\x01\x01')
|
||||
self.assertEqual('{0:\x00^6}'.format(3.14), '\x003.14\x00')
|
||||
self.assertEqual('{0:^6}'.format(3.14), ' 3.14 ')
|
||||
self.assertEqual('{0:\x00<6}'.format(3.25), '3.25\x00\x00')
|
||||
self.assertEqual('{0:\x01<6}'.format(3.25), '3.25\x01\x01')
|
||||
self.assertEqual('{0:\x00^6}'.format(3.25), '\x003.25\x00')
|
||||
self.assertEqual('{0:^6}'.format(3.25), ' 3.25 ')
|
||||
|
||||
self.assertEqual('{0:\x00<12}'.format(3+2.0j), '(3+2j)\x00\x00\x00\x00\x00\x00')
|
||||
self.assertEqual('{0:\x01<12}'.format(3+2.0j), '(3+2j)\x01\x01\x01\x01\x01\x01')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue