mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #3382. float 'F' formatting no longer maps to 'f'. This only affects nan and inf.
This commit is contained in:
parent
5776c1623c
commit
741191f17a
6 changed files with 48 additions and 12 deletions
|
@ -779,6 +779,14 @@ class UnicodeTest(
|
|||
return '\u1234'
|
||||
self.assertEqual('%s' % Wrapper(), '\u1234')
|
||||
|
||||
# issue 3382
|
||||
NAN = float('nan')
|
||||
INF = float('inf')
|
||||
self.assertEqual('%f' % NAN, 'nan')
|
||||
self.assertEqual('%F' % NAN, 'NAN')
|
||||
self.assertEqual('%f' % INF, 'inf')
|
||||
self.assertEqual('%F' % INF, 'INF')
|
||||
|
||||
@support.run_with_locale('LC_ALL', 'de_DE', 'fr_FR')
|
||||
def test_format_float(self):
|
||||
# should not format with a comma, but always with C locale
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue