Exemplo n.º 1
0
 def test_set_location(self):
     n1 = NodeData(0, (1, 2, 3))
     assert (1, 2, 3) == n1.getLocation()
     n1.setLocation((4, 2, 4))
     assert (4, 2, 4) == n1.getLocation()
     n1.setLocation(None)
     assert (4, 2, 4) == n1.getLocation()
Exemplo n.º 2
0
 def test_comper(self):
     node1 = NodeData(0)
     node2 = NodeData(0)
     assert node1.comper(node2)
     assert not node1.comper({123})
     node1.setLocation((0, 1, 2))
     assert not node1.comper(node2)
     node2.setLocation((0, 1, 2))
     assert node1.comper(node2)
     node2.setLocation((0, 1, 3))
     assert not node1.comper(node2)