From 6014e427247c57be3ac971b638074c3c7e296dcb Mon Sep 17 00:00:00 2001 From: Jakob Schnell Date: Fri, 18 Oct 2024 15:51:58 +0200 Subject: [PATCH] tests: add export proc test --- tests/test_proc.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/test_proc.py b/tests/test_proc.py index a6850ab..ebe9f3d 100644 --- a/tests/test_proc.py +++ b/tests/test_proc.py @@ -6,6 +6,7 @@ QgsVectorLayer, QgsFeature, QgsGeometry, + QgsRectangle, ) from qgis.testing import unittest @@ -15,6 +16,7 @@ from ORStools.proc.isochrones_layer_proc import ORSIsochronesLayerAlgo from ORStools.proc.isochrones_point_proc import ORSIsochronesPointAlgo from ORStools.proc.matrix_proc import ORSMatrixAlgo +from ORStools.proc.export_proc import ORSExportAlgo class TestProc(unittest.TestCase): @@ -42,7 +44,9 @@ def setUpClass(cls) -> None: feature.setGeometry(line_geometry) cls.line_layer.dataProvider().addFeatures([feature]) - cls.bbox = None + lower_left = QgsPointXY(8.45, 48.85) + upper_right = QgsPointXY(8.46, 48.86) + cls.bbox = QgsRectangle(lower_left, upper_right) cls.feedback = QgsProcessingFeedback() cls.context = QgsProcessingContext() @@ -181,10 +185,12 @@ def test_matrix(self): def test_export(self): parameters = { - "INPUT_EXPORT": self.bbox, - "OUTPUT_POINT": None, - - } + "INPUT_PROVIDER": 0, + "INPUT_PROFILE": 0, + "INPUT_EXPORT": self.bbox, + "OUTPUT_POINT": "TEMPORARY_OUTPUT", + "OUTPUT": "TEMPORARY_OUTPUT", + } export = ORSExportAlgo().create() dest_id = export.processAlgorithm(parameters, self.context, self.feedback)