MCPcopy Index your code
hub / github.com/python/cpython / test_max_mag

Method test_max_mag

Lib/test/test_decimal.py:3428–3438  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3426 self.assertRaises(TypeError, c.max, 1, '2')
3427
3428 def test_max_mag(self):
3429 Decimal = self.decimal.Decimal
3430 Context = self.decimal.Context
3431
3432 c = Context()
3433 d = c.max_mag(Decimal(1), Decimal(2))
3434 self.assertEqual(c.max_mag(1, 2), d)
3435 self.assertEqual(c.max_mag(Decimal(1), 2), d)
3436 self.assertEqual(c.max_mag(1, Decimal(2)), d)
3437 self.assertRaises(TypeError, c.max_mag, '1', 2)
3438 self.assertRaises(TypeError, c.max_mag, 1, '2')
3439
3440 def test_min(self):
3441 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

max_magMethod · 0.95
DecimalClass · 0.85
ContextClass · 0.70
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected