Test if two trees are equal.
(self, other: object)
| 500 | ) |
| 501 | |
| 502 | def __eq__(self, other: object) -> bool: |
| 503 | """Test if two trees are equal.""" |
| 504 | if not isinstance(other, RedBlackTree): |
| 505 | return NotImplemented |
| 506 | if self.label == other.label: |
| 507 | return self.left == other.left and self.right == other.right |
| 508 | else: |
| 509 | return False |
| 510 | |
| 511 | |
| 512 | def color(node: RedBlackTree | None) -> int: |
nothing calls this directly
no outgoing calls
no test coverage detected