def test_is_leaf_false(): parent = TreeNode('inner') TreeNode('leaf', parent) assert parent.is_leaf() is False
def test_is_leaf_true(): leaf = TreeNode('leaf') assert leaf.is_leaf() is True
def test_is_leaf_false(): parent = TreeNode('inner') TreeNode('leaf', parent) assert parent.is_leaf() is False
def test_is_leaf_true(): leaf = TreeNode('leaf') assert leaf.is_leaf() is True