(self)
| 4667 | c.flags[DivisionByZero]) |
| 4668 | |
| 4669 | def test_power(self): |
| 4670 | Decimal = self.decimal.Decimal |
| 4671 | localcontext = self.decimal.localcontext |
| 4672 | Overflow = self.decimal.Overflow |
| 4673 | Rounded = self.decimal.Rounded |
| 4674 | |
| 4675 | with localcontext() as c: |
| 4676 | c.prec = 3 |
| 4677 | c.clear_flags() |
| 4678 | self.assertEqual(Decimal("1.0") ** 100, Decimal('1.00')) |
| 4679 | self.assertTrue(c.flags[Rounded]) |
| 4680 | |
| 4681 | c.prec = 1 |
| 4682 | c.Emax = 1 |
| 4683 | c.Emin = -1 |
| 4684 | c.clear_flags() |
| 4685 | c.traps[Overflow] = False |
| 4686 | self.assertEqual(Decimal(10000) ** Decimal("0.5"), Decimal('inf')) |
| 4687 | self.assertTrue(c.flags[Overflow]) |
| 4688 | |
| 4689 | def test_quantize(self): |
| 4690 | Decimal = self.decimal.Decimal |
nothing calls this directly
no test coverage detected