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

Method test_min_mag

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

Source from the content-addressed store, hash-verified

3455 self.assertRaises(TypeError, c.min, 1, '2')
3456
3457 def test_min_mag(self):
3458 Decimal = self.decimal.Decimal
3459 Context = self.decimal.Context
3460
3461 c = Context()
3462 d = c.min_mag(Decimal(1), Decimal(2))
3463 self.assertEqual(c.min_mag(1, 2), d)
3464 self.assertEqual(c.min_mag(Decimal(1), 2), d)
3465 self.assertEqual(c.min_mag(1, Decimal(2)), d)
3466 self.assertRaises(TypeError, c.min_mag, '1', 2)
3467 self.assertRaises(TypeError, c.min_mag, 1, '2')
3468
3469 def test_minus(self):
3470 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected