Lines Matching refs:quantize

2047         #to quantize, which is already extensively tested
2455 ans = str(Decimal('1.50001').quantize(exp=Decimal('1e-3'), rounding=None, context=None))
2458 ans = str(Decimal('1.50001').quantize(exp=Decimal('1e-3'), rounding=None, context=None))
2460 ans = str(Decimal('1.50001').quantize(exp=Decimal('1e-3'), rounding=ROUND_UP, context=None))
2463 self.assertRaises(InvalidOperation, y.quantize, Decimal('1e-10'), rounding=ROUND_UP, context=None)
2504 self.assertEqual(Decimal(1234).quantize(100),
2505 Decimal(1234).quantize(Decimal(100)))
2702 Decimal('7.335').quantize(Decimal('.01')),
2706 Decimal('7.335').quantize(Decimal('.01'), rounding=ROUND_DOWN),
2711 Decimal("10e99999").quantize, Decimal('1e100000'), context=c
2716 x = d.quantize(context=c, exp=Decimal("1e797"), rounding=ROUND_DOWN)
2796 D("0.2").quantize, D('1e10'), context=xc)
3501 d = c.quantize(Decimal(1), Decimal(2))
3502 self.assertEqual(c.quantize(1, 2), d)
3503 self.assertEqual(c.quantize(Decimal(1), 2), d)
3504 self.assertEqual(c.quantize(1, Decimal(2)), d)
3505 self.assertRaises(TypeError, c.quantize, '1', 2)
3506 self.assertRaises(TypeError, c.quantize, 1, '2')
4283 self.assertRaises(InvalidOperation, c.quantize, Decimal('9e2'), 0)
4568 x = Decimal(99).quantize(Decimal("1e1"))
4773 checkSameDec("quantize", True)
5238 Decimal("1.23456789").quantize, Decimal('1e-100000'), []
5242 Decimal("1.23456789").quantize, Decimal('1e-100000'), getcontext()
5246 Decimal("1.23456789").quantize, Decimal('1e-100000'), 10
5250 Decimal("1.23456789").quantize, Decimal('1e-100000'), ROUND_UP, 1000
5316 self.assertRaises(TypeError, x.quantize, 1, [], context=None)
5317 self.assertRaises(TypeError, x.quantize, 1, [], rounding=None)
5318 self.assertRaises(TypeError, x.quantize, 1, [], [])