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

Method test_compare_total

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

Source from the content-addressed store, hash-verified

3127 self.assertRaises(TypeError, c.compare_signal, 1, '1')
3128
3129 def test_compare_total(self):
3130 Decimal = self.decimal.Decimal
3131 Context = self.decimal.Context
3132
3133 c = Context()
3134 d = c.compare_total(Decimal(1), Decimal(1))
3135 self.assertEqual(c.compare_total(1, 1), d)
3136 self.assertEqual(c.compare_total(Decimal(1), 1), d)
3137 self.assertEqual(c.compare_total(1, Decimal(1)), d)
3138 self.assertRaises(TypeError, c.compare_total, '1', 1)
3139 self.assertRaises(TypeError, c.compare_total, 1, '1')
3140
3141 def test_compare_total_mag(self):
3142 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected