Test that the tree balances inserts to O(log(n)) by doing a lot of them.
()
| 558 | |
| 559 | |
| 560 | def test_insertion_speed() -> bool: |
| 561 | """Test that the tree balances inserts to O(log(n)) by doing a lot |
| 562 | of them. |
| 563 | """ |
| 564 | tree = RedBlackTree(-1) |
| 565 | for i in range(300000): |
| 566 | tree = tree.insert(i) |
| 567 | return True |
| 568 | |
| 569 | |
| 570 | def test_insert() -> bool: |
no test coverage detected