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

Method test_hashkey_helper_1

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

Source from the content-addressed store, hash-verified

448class HamtTest(unittest.TestCase):
449
450 def test_hashkey_helper_1(self):
451 k1 = HashKey(10, 'aaa')
452 k2 = HashKey(10, 'bbb')
453
454 self.assertNotEqual(k1, k2)
455 self.assertEqual(hash(k1), hash(k2))
456
457 d = dict()
458 d[k1] = 'a'
459 d[k2] = 'b'
460
461 self.assertEqual(d[k1], 'a')
462 self.assertEqual(d[k2], 'b')
463
464 def test_hamt_basics_1(self):
465 h = hamt()

Callers

nothing calls this directly

Calls 4

HashKeyClass · 0.85
hashFunction · 0.85
assertNotEqualMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected