(self)
| 93 | """Test B+ tree operations when splitting nodes""" |
| 94 | |
| 95 | def test_overflow(self): |
| 96 | tree = BPlusTreeMap(capacity=4) |
| 97 | # With capacity=4, need 5 items to force a split |
| 98 | tree[1] = "one" |
| 99 | tree[2] = "two" |
| 100 | tree[3] = "three" |
| 101 | tree[4] = "four" |
| 102 | tree[5] = "five" |
| 103 | |
| 104 | assert check_invariants(tree) |
| 105 | assert len(tree) == 5 |
| 106 | assert tree[1] == "one" |
| 107 | assert tree[2] == "two" |
| 108 | assert tree[3] == "three" |
| 109 | assert tree[4] == "four" |
| 110 | assert tree[5] == "five" |
| 111 | |
| 112 | assert not tree.root.is_leaf() |
| 113 | |
| 114 | def test_split_then_add(self): |
| 115 | tree = BPlusTreeMap(capacity=4) |
nothing calls this directly
no test coverage detected