def test_depth_one(): """Test that a node of one returns a depth of one.""" from bst import Node a = Node(1) assert a.depth() == 1
def test_depth_many(): """Test that a node with one extra on the left has a depth of 2.""" from bst import Node a = Node(20) a.left = Node(16) assert a.depth() == 2
def test_depth_none(): """Test that a node of nothing returns a value of nothing.""" from bst import Node a = Node() assert a.depth() == 0