def test_copy(self): node1 = Node('47.0', '8.0', 10) node2 = node1.copy() self.assertTrue(node1.latitude == node2.latitude) self.assertTrue(node1.longitude == node2.longitude) self.assertTrue(node1.osm_id == node2.osm_id)
def test_add_meter(self): node1 = Node('47.0', '8.0', 10) node2 = node1.add_meter(3000, 4000) distance = node1.get_distance_in_meter(node2) self.assertTrue(3900 < distance < 4100)