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

Method test_logical_xor

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

Source from the content-addressed store, hash-verified

3407 self.assertRaises(TypeError, c.logical_or, 1, '1')
3408
3409 def test_logical_xor(self):
3410 Decimal = self.decimal.Decimal
3411 Context = self.decimal.Context
3412
3413 c = Context()
3414 d = c.logical_xor(Decimal(1), Decimal(1))
3415 self.assertEqual(c.logical_xor(1, 1), d)
3416 self.assertEqual(c.logical_xor(Decimal(1), 1), d)
3417 self.assertEqual(c.logical_xor(1, Decimal(1)), d)
3418 self.assertRaises(TypeError, c.logical_xor, '1', 1)
3419 self.assertRaises(TypeError, c.logical_xor, 1, '1')
3420
3421 def test_max(self):
3422 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