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

Method test_operator

Lib/test/test_bool.py:269–282  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

267 self.assertIs(bool(t), True)
268
269 def test_operator(self):
270 import operator
271 self.assertIs(operator.truth(0), False)
272 self.assertIs(operator.truth(1), True)
273 self.assertIs(operator.not_(1), False)
274 self.assertIs(operator.not_(0), True)
275 self.assertIs(operator.contains([], 1), False)
276 self.assertIs(operator.contains([1], 1), True)
277 self.assertIs(operator.lt(0, 0), False)
278 self.assertIs(operator.lt(0, 1), True)
279 self.assertIs(operator.is_(True, True), True)
280 self.assertIs(operator.is_(True, False), False)
281 self.assertIs(operator.is_not(True, True), False)
282 self.assertIs(operator.is_not(True, False), True)
283
284 def test_marshal(self):
285 import marshal

Callers

nothing calls this directly

Calls 4

ltMethod · 0.80
is_Method · 0.80
assertIsMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected