def test_eq(self): """Confirm that the __eq__ operator overloader method works as intended.""" # create new position with object as its node: other_container = [] new_position = GeneralTree.Position(other_container, self.node) self.assertEqual(self.test_position, new_position)
def setUp(self): self.test_element = "Test element" self.node = GeneralTree._Node(self.test_element) container = [] # Temporary. Just needs something to pass as container self.test_position = GeneralTree.Position(container, self.node)