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

Method test_logical_and

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

Source from the content-addressed store, hash-verified

3374 self.assertRaises(TypeError, c.logb, '10')
3375
3376 def test_logical_and(self):
3377 Decimal = self.decimal.Decimal
3378 Context = self.decimal.Context
3379
3380 c = Context()
3381 d = c.logical_and(Decimal(1), Decimal(1))
3382 self.assertEqual(c.logical_and(1, 1), d)
3383 self.assertEqual(c.logical_and(Decimal(1), 1), d)
3384 self.assertEqual(c.logical_and(1, Decimal(1)), d)
3385 self.assertRaises(TypeError, c.logical_and, '1', 1)
3386 self.assertRaises(TypeError, c.logical_and, 1, '1')
3387
3388 def test_logical_invert(self):
3389 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected