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

Method test_logical_xor

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

Source from the content-addressed store, hash-verified

3402 self.assertRaises(TypeError, c.logical_or, 1, '1')
3403
3404 def test_logical_xor(self):
3405 Decimal = self.decimal.Decimal
3406 Context = self.decimal.Context
3407
3408 c = Context()
3409 d = c.logical_xor(Decimal(1), Decimal(1))
3410 self.assertEqual(c.logical_xor(1, 1), d)
3411 self.assertEqual(c.logical_xor(Decimal(1), 1), d)
3412 self.assertEqual(c.logical_xor(1, Decimal(1)), d)
3413 self.assertRaises(TypeError, c.logical_xor, '1', 1)
3414 self.assertRaises(TypeError, c.logical_xor, 1, '1')
3415
3416 def test_max(self):
3417 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected