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

Method test_contains

Lib/test/test_operator.py:293–299  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

291 self.assertRaises(ValueError, operator.rshift, 2, -1)
292
293 def test_contains(self):
294 operator = self.module
295 self.assertRaises(TypeError, operator.contains)
296 self.assertRaises(TypeError, operator.contains, None, None)
297 self.assertRaises(ZeroDivisionError, operator.contains, BadIterable(), 1)
298 self.assertTrue(operator.contains(range(4), 2))
299 self.assertFalse(operator.contains(range(4), 5))
300
301 def test_setitem(self):
302 operator = self.module

Callers

nothing calls this directly

Calls 5

assertTrueMethod · 0.80
assertFalseMethod · 0.80
BadIterableClass · 0.70
assertRaisesMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected