--- test_string.py 2011-12-07 08:10:00.806170008 +0530 +++ test_string_fixed.py 2011-12-14 12:15:06.703711859 +0530 @@ -145,2 +145,15 @@ - - + + def test_empty_braces(self): + fmt = string.Formatter() + self.assertEqual(fmt.format("{}","test"),"test") + self.assertEqual(fmt.format("{!r}","test"),"'test'") + with self.assertRaises(ValueError) as err: + fmt.format("{} {0}","test") + + with self.assertRaises(ValueError) as err: + fmt.format("{0} {}","test")