Issue #3382. float 'F' formatting no longer maps to 'f'. This only affects nan and inf.

This commit is contained in:
Eric Smith 2009-05-06 13:08:15 +00:00
parent 5776c1623c
commit 741191f17a
6 changed files with 48 additions and 12 deletions

View file

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