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

Method test_compare_signal

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

Source from the content-addressed store, hash-verified

3120 self.assertRaises(TypeError, c.compare, 1, '1')
3121
3122 def test_compare_signal(self):
3123 Decimal = self.decimal.Decimal
3124 Context = self.decimal.Context
3125
3126 c = Context()
3127 d = c.compare_signal(Decimal(1), Decimal(1))
3128 self.assertEqual(c.compare_signal(1, 1), d)
3129 self.assertEqual(c.compare_signal(Decimal(1), 1), d)
3130 self.assertEqual(c.compare_signal(1, Decimal(1)), d)
3131 self.assertRaises(TypeError, c.compare_signal, '1', 1)
3132 self.assertRaises(TypeError, c.compare_signal, 1, '1')
3133
3134 def test_compare_total(self):
3135 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected