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

Method test_max

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

Source from the content-addressed store, hash-verified

3414 self.assertRaises(TypeError, c.logical_xor, 1, '1')
3415
3416 def test_max(self):
3417 Decimal = self.decimal.Decimal
3418 Context = self.decimal.Context
3419
3420 c = Context()
3421 d = c.max(Decimal(1), Decimal(2))
3422 self.assertEqual(c.max(1, 2), d)
3423 self.assertEqual(c.max(Decimal(1), 2), d)
3424 self.assertEqual(c.max(1, Decimal(2)), d)
3425 self.assertRaises(TypeError, c.max, '1', 2)
3426 self.assertRaises(TypeError, c.max, 1, '2')
3427
3428 def test_max_mag(self):
3429 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected