def test_equals(self): a = Node('abc') b = Node('abc') assert a == a assert not (a != a) assert not (a == b) assert a._recursively_eq(b) assert Node(a) != a assert Node(a)._recursively_eq(Node(a)) assert not Node(a)._recursively_eq(a)
def test_recursive_eq(self): a = Node('a', Node('b')) b = Node('a', Node('b')) c = Node('a', Node('c')) assert a._recursively_eq(b) assert not a._recursively_eq(c)