MCPcopy Create free account
hub / github.com/python/cpython / test_logical_and

Method test_logical_and

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

Source from the content-addressed store, hash-verified

3369 self.assertRaises(TypeError, c.logb, '10')
3370
3371 def test_logical_and(self):
3372 Decimal = self.decimal.Decimal
3373 Context = self.decimal.Context
3374
3375 c = Context()
3376 d = c.logical_and(Decimal(1), Decimal(1))
3377 self.assertEqual(c.logical_and(1, 1), d)
3378 self.assertEqual(c.logical_and(Decimal(1), 1), d)
3379 self.assertEqual(c.logical_and(1, Decimal(1)), d)
3380 self.assertRaises(TypeError, c.logical_and, '1', 1)
3381 self.assertRaises(TypeError, c.logical_and, 1, '1')
3382
3383 def test_logical_invert(self):
3384 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