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

Method check_equal_hash

Lib/test/test_numeric_tower.py:39–43  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

37
38class HashTest(unittest.TestCase):
39 def check_equal_hash(self, x, y):
40 # check both that x and y are equal and that their hashes are equal
41 self.assertEqual(hash(x), hash(y),
42 "got different hashes for {!r} and {!r}".format(x, y))
43 self.assertEqual(x, y)
44
45 def test_bools(self):
46 self.check_equal_hash(False, 0)

Callers 5

test_boolsMethod · 0.95
test_integersMethod · 0.95
test_binary_floatsMethod · 0.95
test_complexMethod · 0.95
test_decimalsMethod · 0.95

Calls 2

assertEqualMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected