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

Method test_max

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

Source from the content-addressed store, hash-verified

3419 self.assertRaises(TypeError, c.logical_xor, 1, '1')
3420
3421 def test_max(self):
3422 Decimal = self.decimal.Decimal
3423 Context = self.decimal.Context
3424
3425 c = Context()
3426 d = c.max(Decimal(1), Decimal(2))
3427 self.assertEqual(c.max(1, 2), d)
3428 self.assertEqual(c.max(Decimal(1), 2), d)
3429 self.assertEqual(c.max(1, Decimal(2)), d)
3430 self.assertRaises(TypeError, c.max, '1', 2)
3431 self.assertRaises(TypeError, c.max, 1, '2')
3432
3433 def test_max_mag(self):
3434 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