Lines Matching refs:format
929 '''Unit tests for the format function.'''
933 # triples giving a format, a Decimal, and the expected result
1135 self.assertEqual(format(Decimal(d), fmt), result)
1137 # bytes format argument
1143 self.assertEqual(format(self.decimal.Decimal('-0.001'), 'z.2f'),
1147 self.assertRaises(ValueError, format, self.decimal.Decimal('1.23'), 'fz')
1247 '({!a} not {!a})'.format(decimal_point, '\u066b'))
1250 '({!a} not {!a})'.format(thousands_sep, '\u066c'))
1252 self.assertEqual(format(Decimal('100000000.123'), 'n'),
1532 "got {4!r}".format(
1546 "got {4!r}".format(
4651 # triples giving a format, a Decimal, and the expected result
4669 self.assertEqual(format(Decimal(d), fmt), result)