(self)
| 898 | self.assertEqual(len(h), 0) |
| 899 | |
| 900 | def test_hamt_items_1(self): |
| 901 | A = HashKey(100, 'A') |
| 902 | B = HashKey(201001, 'B') |
| 903 | C = HashKey(101001, 'C') |
| 904 | D = HashKey(103, 'D') |
| 905 | E = HashKey(104, 'E') |
| 906 | F = HashKey(110, 'F') |
| 907 | |
| 908 | h = hamt() |
| 909 | h = h.set(A, 'a') |
| 910 | h = h.set(B, 'b') |
| 911 | h = h.set(C, 'c') |
| 912 | h = h.set(D, 'd') |
| 913 | h = h.set(E, 'e') |
| 914 | h = h.set(F, 'f') |
| 915 | |
| 916 | it = h.items() |
| 917 | self.assertEqual( |
| 918 | set(list(it)), |
| 919 | {(A, 'a'), (B, 'b'), (C, 'c'), (D, 'd'), (E, 'e'), (F, 'f')}) |
| 920 | |
| 921 | def test_hamt_items_2(self): |
| 922 | A = HashKey(100, 'A') |