diff --git a/orm_importer/importer.py b/orm_importer/importer.py index 1afc186..78c4c95 100644 --- a/orm_importer/importer.py +++ b/orm_importer/importer.py @@ -145,7 +145,9 @@ def _should_add_edge(self, node_a: model.Node, node_b: model.Node, path: list[in present_paths = self.paths[(node_a, node_b)] + self.paths[(node_b, node_a)] return path not in present_paths and reversed_path not in present_paths - def run(self, polygon, railway_option_types): + def run(self, polygon, railway_option_types: list[str] = None): + if railway_option_types is None: + railway_option_types = ["rail"] track_objects = self._get_track_objects(polygon, railway_option_types) self.graph = self._build_graph(track_objects) diff --git a/tests/test_converter.py b/tests/test_converter.py index 1d07a71..e40c8ec 100644 --- a/tests/test_converter.py +++ b/tests/test_converter.py @@ -20,4 +20,4 @@ def test_query_griebnitzsee(mock_converter): assert len(res.nodes) == 10 assert len(res.edges) == 9 - assert len(res.signals) == 9 + assert len(res.signals) == 17