Index: test/test_locale.py =================================================================== --- test/test_locale.py (Revision 74327) +++ test/test_locale.py (Arbeitskopie) @@ -298,6 +298,16 @@ grouping=True, international=True) +class TestLocaleFormatString(unittest.TestCase): + """General tests on locale.format_string""" + + def test_percentage(self): + self.assertEqual(locale.format_string('%f%%', 1.0), '1.000000%') + + self.assertEqual(locale.format_string('%d %f%%d', (1, 1.0)), + '1 1.000000%d') + + class TestStringMethods(BaseLocalizedTest): locale_type = locale.LC_CTYPE @@ -351,6 +361,7 @@ def test_main(): tests = [ TestMiscellaneous, + TestLocaleFormatString, TestEnUSNumberFormatting, TestCNumberFormatting, TestFrFRNumberFormatting,