diff --git a/wntr/tests/test_gis.py b/wntr/tests/test_gis.py index b56b6b616..9772ceaec 100644 --- a/wntr/tests/test_gis.py +++ b/wntr/tests/test_gis.py @@ -43,6 +43,10 @@ def setUpClass(self): self.results = sim.run_sim() self.gis_data = self.wn.to_gis() + vertex_inp_file = join(datadir, "io.inp") + self.vertex_wn = self.wntr.network.WaterNetworkModel(vertex_inp_file) + self.vertex_gis_data = self.vertex_wn.to_gis() + polygon_pts = [[(25,80), (65,80), (65,60), (25,60)], [(25,60), (80,60), (80,30), (25,30)], [(40,50), (60,65), (60,15), (40,15)]] @@ -102,6 +106,11 @@ def test_gis_to_wn(self): G2 = wn2.to_graph() assert nx.is_isomorphic(G1, G2) + + # test vertices + vertex_wn2 = wntr.network.io.from_gis(self.vertex_gis_data) + for name, link in vertex_wn2.links(): + assert link.vertices == self.vertex_wn.get_link(name).vertices def test_intersect_points_with_polygons(self):