def test_graph_edge_segments_pd(self): segments = connect_edges_pd(self.graph) paths = [] nodes = np.column_stack(self.nodes) for start, end in zip(nodes[self.source], nodes[self.target]): paths.append(np.array([start[:2], end[:2]])) self.assertEqual(segments, paths)