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

Method test_min

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

Source from the content-addressed store, hash-verified

3438 self.assertRaises(TypeError, c.max_mag, 1, '2')
3439
3440 def test_min(self):
3441 Decimal = self.decimal.Decimal
3442 Context = self.decimal.Context
3443
3444 c = Context()
3445 d = c.min(Decimal(1), Decimal(2))
3446 self.assertEqual(c.min(1, 2), d)
3447 self.assertEqual(c.min(Decimal(1), 2), d)
3448 self.assertEqual(c.min(1, Decimal(2)), d)
3449 self.assertRaises(TypeError, c.min, '1', 2)
3450 self.assertRaises(TypeError, c.min, 1, '2')
3451
3452 def test_min_mag(self):
3453 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected