MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_min

Method test_min

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

Source from the content-addressed store, hash-verified

3443 self.assertRaises(TypeError, c.max_mag, 1, '2')
3444
3445 def test_min(self):
3446 Decimal = self.decimal.Decimal
3447 Context = self.decimal.Context
3448
3449 c = Context()
3450 d = c.min(Decimal(1), Decimal(2))
3451 self.assertEqual(c.min(1, 2), d)
3452 self.assertEqual(c.min(Decimal(1), 2), d)
3453 self.assertEqual(c.min(1, Decimal(2)), d)
3454 self.assertRaises(TypeError, c.min, '1', 2)
3455 self.assertRaises(TypeError, c.min, 1, '2')
3456
3457 def test_min_mag(self):
3458 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