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

Method test_hashkey_helper_1

Lib/test/test_context.py:663–675  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

661class HamtTest(unittest.TestCase):
662
663 def test_hashkey_helper_1(self):
664 k1 = HashKey(10, 'aaa')
665 k2 = HashKey(10, 'bbb')
666
667 self.assertNotEqual(k1, k2)
668 self.assertEqual(hash(k1), hash(k2))
669
670 d = dict()
671 d[k1] = 'a'
672 d[k2] = 'b'
673
674 self.assertEqual(d[k1], 'a')
675 self.assertEqual(d[k2], 'b')
676
677 def test_hamt_basics_1(self):
678 h = hamt()

Callers

nothing calls this directly

Calls 3

HashKeyClass · 0.85
assertNotEqualMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected