Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_format.py @ 77462:73ff365bbb1d
Fix "%f" format of str%args if the result is not an ASCII or latin1 string
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Sat, 16 Jun 2012 02:57:41 +0200 |
| parents | 1ea466240792 |
| children | 3eb693462891 559a430e563c |
line wrap: on
line diff
--- a/Lib/test/test_format.py Sat Jun 16 02:44:43 2012 +0200 +++ b/Lib/test/test_format.py Sat Jun 16 02:57:41 2012 +0200 @@ -265,6 +265,8 @@ raise TestFailed('"%*d"%(maxsize, -127) should fail') def test_non_ascii(self): + testformat("\u20ac=%f", (1.0,), "\u20ac=1.000000") + self.assertEqual(format("abc", "\u2007<5"), "abc\u2007\u2007") self.assertEqual(format(123, "\u2007<5"), "123\u2007\u2007") self.assertEqual(format(12.3, "\u2007<6"), "12.3\u2007\u2007")
