python/test_node.py
Matej Focko f66dec1e03
chore: update tests and add avl tests
Signed-off-by: Matej Focko <mfocko@redhat.com>
2022-01-30 15:04:08 +01:00

15 lines
332 B
Python

from node import Node
def test_default_rank():
node = Node(0)
assert 0 == node.value
assert node.parent is None
assert node.left is None
assert node.right is None
assert 0 == node.rank
assert 0 == Node.get_rank(node)
assert -1 == Node.difference(node)
assert (1, 1) == Node.differences(node)