Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
     
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)