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

Method test_hash

Lib/test/test_functools.py:1164–1170  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1162 [0, 1, 1, 2, 3, 4, 5, 7, 10])
1163
1164 def test_hash(self):
1165 def mycmp(x, y):
1166 return y - x
1167 key = self.cmp_to_key(mycmp)
1168 k = key(10)
1169 self.assertRaises(TypeError, hash, k)
1170 self.assertNotIsInstance(k, collections.abc.Hashable)
1171
1172 @unittest.skipIf(support.MISSING_C_DOCSTRINGS,
1173 "Signature information for builtins requires docstrings")

Callers 1

test_hashMethod · 0.45

Calls 2

assertNotIsInstanceMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected