Lines Matching refs:grouping
169 self._test_format("%f", 1024, grouping=1, out='1%s024.000000' % self.sep)
170 self._test_format("%f", 102, grouping=1, out='102.000000')
171 self._test_format("%f", -42, grouping=1, out='-42.000000')
172 self._test_format("%+f", -42, grouping=1, out='-42.000000')
175 self._test_format("%20.f", -42, grouping=1, out='-42'.rjust(20))
177 self._test_format("%+10.f", -4200, grouping=1,
179 self._test_format("%-10.f", -4200, grouping=1,
183 self._test_format("%d", 4200, grouping=True, out='4%s200' % self.sep)
184 self._test_format("%+d", 4200, grouping=True, out='+4%s200' % self.sep)
185 self._test_format("%+d", -4200, grouping=True, out='-4%s200' % self.sep)
188 self._test_format("%10d", 4200, grouping=True,
190 self._test_format("%-10d", -4200, grouping=True,
194 self._test_format("%f", 1024, grouping=0, out='1024.000000')
195 self._test_format("%f", 102, grouping=0, out='102.000000')
196 self._test_format("%f", -42, grouping=0, out='-42.000000')
197 self._test_format("%+f", -42, grouping=0, out='-42.000000')
200 self._test_format("%20.f", -42, grouping=0, out='-42'.rjust(20))
201 self._test_format("%+10.f", -4200, grouping=0, out='-4200'.rjust(10))
202 self._test_format("%-10.f", 4200, grouping=0, out='4200'.ljust(10))
206 locale.format("%-10.f", 4200, grouping=True)
210 self._test_format_string("One million is %i", 1000000, grouping=1,
212 self._test_format_string("One million is %i", 1000000, grouping=1,
218 self._test_format_string("--> %10.2f", 4200, grouping=1,
221 self._test_format_string("%10.*f", (2, 1000), grouping=0,
224 self._test_format_string("%*.*f", (10, 2, 1000), grouping=1,
229 (1000, 1000.0, 'str'), grouping=1,
286 self._test_currency(50000, "$50,000.00", grouping=True)
288 grouping=True, international=True)
295 self._test_format("%.2f", 12345.67, grouping=True, out='12345.67')
298 self._test_format("%9.2f", 12345.67, grouping=True, out=' 12345.67')
308 self._test_format("%.2f", 345.67, grouping=True, out='345,67')
309 self._test_format("%.2f", 12345.67, grouping=True, out='12 345,67')
312 self._test_format("%6.2f", 345.67, grouping=True, out='345,67')
313 self._test_format("%7.2f", 345.67, grouping=True, out=' 345,67')
314 self._test_format("%8.2f", 12345.67, grouping=True, out='12 345,67')
315 self._test_format("%9.2f", 12345.67, grouping=True, out='12 345,67')
316 self._test_format("%10.2f", 12345.67, grouping=True, out=' 12 345,67')
317 self._test_format("%-6.2f", 345.67, grouping=True, out='345,67')
318 self._test_format("%-7.2f", 345.67, grouping=True, out='345,67 ')
319 self._test_format("%-8.2f", 12345.67, grouping=True, out='12 345,67')
320 self._test_format("%-9.2f", 12345.67, grouping=True, out='12 345,67')
321 self._test_format("%-10.2f", 12345.67, grouping=True, out='12 345,67 ')
324 self._test_format("%d", 200, grouping=True, out='200')
325 self._test_format("%d", 4200, grouping=True, out='4 200')
328 self._test_format("%4d", 4200, grouping=True, out='4 200')
329 self._test_format("%5d", 4200, grouping=True, out='4 200')
330 self._test_format("%10d", 4200, grouping=True, out='4 200'.rjust(10))
331 self._test_format("%-4d", 4200, grouping=True, out='4 200')
332 self._test_format("%-5d", 4200, grouping=True, out='4 200')
333 self._test_format("%-10d", 4200, grouping=True, out='4 200'.ljust(10))
338 self._test_currency(50000, "50 000,00 " + euro, grouping=True)
340 grouping=True, international=True)
642 def _test_localize(self, value, out, grouping=False): argument
643 self.assertEqual(locale.localize(value, grouping=grouping), out)
664 self._test_localize('50000.00', '50 000,00', grouping=True)