Lines Matching refs:format
144 def _test_formatfunc(self, format, value, out, func, **format_opts):
146 func(format, value, **format_opts), out)
148 def _test_format(self, format, value, out, **format_opts):
150 self._test_formatfunc(format, value, out,
151 func=locale.format, **format_opts)
153 def _test_format_string(self, format, value, out, **format_opts):
154 self._test_formatfunc(format, value, out,
206 locale.format("%-10.f", 4200, grouping=True)
235 # Test handling of pattern argument of format
240 self.assertRaises(ValueError, locale.format, "%f\n", 'foo')
241 self.assertRaises(ValueError, locale.format, "%f\r", 'foo')
242 self.assertRaises(ValueError, locale.format, "%f\r\n", 'foo')
243 self.assertRaises(ValueError, locale.format, " %f", 'foo')
244 self.assertRaises(ValueError, locale.format, "%fg", 'foo')
245 self.assertRaises(ValueError, locale.format, "%^g", 'foo')
246 self.assertRaises(ValueError, locale.format, "%f%%", 'foo')
668 '{0:.16f}'.format(Decimal('1.15')), '1.1500000000000000')