• Home
  • Raw
  • Download

Lines Matching refs:InvalidOperation

86       C.Overflow, C.DivisionByZero, C.InvalidOperation,
89 P.Overflow, P.DivisionByZero, P.InvalidOperation,
264 'conversion_syntax' : self.decimal.InvalidOperation,
266 'division_impossible' : self.decimal.InvalidOperation,
267 'division_undefined' : self.decimal.InvalidOperation,
269 'invalid_context' : self.decimal.InvalidOperation,
270 'invalid_operation' : self.decimal.InvalidOperation,
369 raise self.decimal.InvalidOperation
548 InvalidOperation = self.decimal.InvalidOperation
582 c.traps[InvalidOperation] = True
584 self.assertRaises(InvalidOperation, Decimal, "xyz")
589 self.assertRaises(InvalidOperation, Decimal, "1\u00a02\u00a03")
590 self.assertRaises(InvalidOperation, Decimal, "\u00a01\u00a02\u00a0")
593 self.assertRaises(InvalidOperation, Decimal, "\u00a0")
594 self.assertRaises(InvalidOperation, Decimal, "\u00a0\u00a0")
597 self.assertRaises(InvalidOperation, Decimal, "12\u00003")
600 self.assertRaises(InvalidOperation, Decimal, "1_2_\u00003")
729 InvalidOperation = self.decimal.InvalidOperation
775 nc.traps[InvalidOperation] = True
795 self.assertRaises(InvalidOperation, nc.create_decimal, "xyz")
799 self.assertRaises(InvalidOperation, nc.create_decimal, " 1234")
800 self.assertRaises(InvalidOperation, nc.create_decimal, "12_34")
804 self.assertRaises(InvalidOperation, nc.create_decimal, 'NaN12345')
805 self.assertRaises(InvalidOperation, nc.create_decimal,
808 nc.traps[InvalidOperation] = False
810 self.assertTrue(nc.flags[InvalidOperation])
812 nc.flags[InvalidOperation] = False
814 self.assertTrue(nc.flags[InvalidOperation])
1462 InvalidOperation = self.decimal.InvalidOperation
1487 ctx.traps[InvalidOperation] = 1
1501 self.assertRaises(InvalidOperation, operator.eq, x, y)
1502 self.assertRaises(InvalidOperation, operator.ne, x, y)
1506 self.assertRaises(InvalidOperation, op, x, y)
1524 InvalidOperation = cls.decimal.InvalidOperation
1547 cls.assertRaises(InvalidOperation, c3.compare, d1, Decimal('sNaN'))
1548 cls.assertTrue(c3.flags[InvalidOperation])
1550 cls.assertFalse(c2.flags[InvalidOperation])
1558 for sig in Overflow, Underflow, DivisionByZero, InvalidOperation:
1563 InvalidOperation = cls.decimal.InvalidOperation
1602 for sig in Overflow, Underflow, DivisionByZero, InvalidOperation:
1739 InvalidOperation = self.decimal.InvalidOperation
1771 self.assertRaises(InvalidOperation, D('nan').__gt__, F(-9,123))
2188 InvalidOperation = self.decimal.InvalidOperation
2223 self.assertRaises(InvalidOperation, Decimal(-1).ln, context=None)
2224 self.assertTrue(c.flags[InvalidOperation])
2231 self.assertRaises(InvalidOperation, Decimal(-1).log10, context=None)
2232 self.assertTrue(c.flags[InvalidOperation])
2241 self.assertRaises(InvalidOperation, y.logical_invert, context=None)
2242 self.assertTrue(c.flags[InvalidOperation])
2246 self.assertRaises(InvalidOperation, Decimal('sNaN').next_minus, context=None)
2247 self.assertTrue(c.flags[InvalidOperation])
2251 self.assertRaises(InvalidOperation, Decimal('sNaN').next_plus, context=None)
2252 self.assertTrue(c.flags[InvalidOperation])
2281 self.assertRaises(InvalidOperation, x.compare, Decimal('sNaN'), context=None)
2282 self.assertTrue(c.flags[InvalidOperation])
2287 self.assertRaises(InvalidOperation, x.compare_signal, Decimal('NaN'), context=None)
2288 self.assertTrue(c.flags[InvalidOperation])
2293 self.assertRaises(InvalidOperation, x.logical_and, 123, context=None)
2294 self.assertTrue(c.flags[InvalidOperation])
2299 self.assertRaises(InvalidOperation, x.logical_or, 123, context=None)
2300 self.assertTrue(c.flags[InvalidOperation])
2305 self.assertRaises(InvalidOperation, x.logical_xor, 123, context=None)
2306 self.assertTrue(c.flags[InvalidOperation])
2311 self.assertRaises(InvalidOperation, x.max, Decimal('sNaN'), context=None)
2312 self.assertTrue(c.flags[InvalidOperation])
2317 self.assertRaises(InvalidOperation, x.max_mag, Decimal('sNaN'), context=None)
2318 self.assertTrue(c.flags[InvalidOperation])
2323 self.assertRaises(InvalidOperation, x.min, Decimal('sNaN'), context=None)
2324 self.assertTrue(c.flags[InvalidOperation])
2329 self.assertRaises(InvalidOperation, x.min_mag, Decimal('sNaN'), context=None)
2330 self.assertTrue(c.flags[InvalidOperation])
2335 self.assertRaises(InvalidOperation, y.remainder_near, 101, context=None)
2336 self.assertTrue(c.flags[InvalidOperation])
2341 self.assertRaises(InvalidOperation, x.rotate, 101, context=None)
2342 self.assertTrue(c.flags[InvalidOperation])
2347 self.assertRaises(InvalidOperation, x.scaleb, 10000, context=None)
2348 self.assertTrue(c.flags[InvalidOperation])
2353 self.assertRaises(InvalidOperation, x.shift, 10000, context=None)
2354 self.assertTrue(c.flags[InvalidOperation])
2375 self.assertRaises(InvalidOperation, Decimal('sNaN').to_integral, context=None)
2376 self.assertTrue(c.flags[InvalidOperation])
2387 self.assertRaises(InvalidOperation, Decimal('sNaN').to_integral_value, context=None)
2388 self.assertTrue(c.flags[InvalidOperation])
2399 self.assertRaises(InvalidOperation, Decimal('sNaN').to_integral_exact, context=None)
2400 self.assertTrue(c.flags[InvalidOperation])
2411 … self.assertRaises(InvalidOperation, y.quantize, Decimal('1e-10'), rounding=ROUND_UP, context=None)
2412 self.assertTrue(c.flags[InvalidOperation])
2639 InvalidOperation = self.decimal.InvalidOperation
2651 InvalidOperation,
2680 InvalidOperation = self.decimal.InvalidOperation
2696 self.assertRaises(InvalidOperation, D, "xyz", context=xc)
2697 self.assertTrue(xc.flags[InvalidOperation])
2698 self.assertFalse(c.flags[InvalidOperation])
2708 self.assertRaises(InvalidOperation, D(-1).ln, context=xc)
2709 self.assertTrue(xc.flags[InvalidOperation])
2710 self.assertFalse(c.flags[InvalidOperation])
2723 self.assertRaises(InvalidOperation,
2725 self.assertTrue(xc.flags[InvalidOperation])
2726 self.assertFalse(c.flags[InvalidOperation])
2736 self.assertRaises(InvalidOperation,
2738 self.assertTrue(xc.flags[InvalidOperation])
2739 self.assertFalse(c.flags[InvalidOperation])
2792 InvalidOperation = decimal.InvalidOperation
2804 self.assertTrue(issubclass(InvalidOperation, DecimalException))
2822 self.assertTrue(issubclass(decimal.ConversionSyntax, InvalidOperation))
2823 self.assertTrue(issubclass(decimal.DivisionImpossible, InvalidOperation))
2824 self.assertTrue(issubclass(decimal.DivisionUndefined, InvalidOperation))
2826 self.assertTrue(issubclass(decimal.InvalidContext, InvalidOperation))
2837 InvalidOperation = self.decimal.InvalidOperation
2852 assert_signals(self, c, 'traps', [InvalidOperation, DivisionByZero,
3995 InvalidOperation = self.decimal.InvalidOperation
4002 [InvalidOperation, DivisionByZero, Overflow, Underflow, Clamped]
4032 InvalidOperation = self.decimal.InvalidOperation
4040 [InvalidOperation, DivisionByZero, Overflow]
4152 InvalidOperation = decimal.InvalidOperation
4190 self.assertRaises(InvalidOperation, c.quantize, Decimal('9e2'), 0)
4407 InvalidOperation = self.decimal.InvalidOperation
4418 c.traps[InvalidOperation] = False
4422 c.traps[InvalidOperation] = False
4426 self.assertTrue(c.flags[InvalidOperation])
4431 self.assertTrue(c.flags[InvalidOperation])
4436 self.assertTrue(c.flags[InvalidOperation])
4442 self.assertTrue(c.flags[InvalidOperation] and
4468 InvalidOperation = self.decimal.InvalidOperation
4474 c.traps[InvalidOperation] = False
4821 InvalidOperation = C.InvalidOperation
4826 self.assertRaises(InvalidOperation, Decimal,
4860 InvalidOperation = C.InvalidOperation
4874 self.assertRaises(ValueError, c.traps.__delitem__, InvalidOperation)
4973 InvalidOperation = C.InvalidOperation
5063 InvalidOperation = C.InvalidOperation
5070 c.traps[InvalidOperation] = True
5071 self.assertRaises(InvalidOperation, Decimal("1.23").__round__,
5073 self.assertRaises(InvalidOperation, Decimal("1.23").__round__,
5075 self.assertRaises(InvalidOperation, Decimal("1").__round__,
5077 self.assertRaises(C.InvalidOperation, Decimal("1").__round__,
5132 InvalidOperation = C.InvalidOperation
5176 self.assertTrue(c.flags[InvalidOperation])
5179 c.traps[InvalidOperation] = True
5180 self.assertRaises(InvalidOperation, Decimal(9).__divmod__, 0)
5181 self.assertRaises(InvalidOperation, c.divmod, 9, 0)
5184 c.traps[InvalidOperation] = True
5186 self.assertRaises(InvalidOperation, pow, Decimal(1000), 1, 501)
5251 InvalidOperation = C.InvalidOperation
5302 self.assertTrue(c.traps[InvalidOperation])
5327 InvalidOperation: C.DecIEEEInvalidOperation
5371 assertIsExclusivelySet(InvalidOperation, c.flags)
5376 assertIsExclusivelySet(InvalidOperation, c.traps)
5418 InvalidOperation = C.InvalidOperation
5422 c.traps[InvalidOperation] = True
5426 self.assertRaises(InvalidOperation, Decimal, x)
5429 self.assertRaises(InvalidOperation, Decimal, x)
5433 self.assertRaises(InvalidOperation, Decimal, x)
5437 self.assertRaises(InvalidOperation, Decimal, x)
5442 InvalidOperation = C.InvalidOperation
5448 c.traps[InvalidOperation] = True
5455 self.assertRaises(InvalidOperation, Decimal, x)
5459 self.assertRaises(InvalidOperation, Decimal, x)
5464 self.assertRaises(InvalidOperation, Decimal, x)
5468 self.assertRaises(InvalidOperation, Decimal, x)