Skip to content

Commit

Permalink
tests: add export proc test
Browse files Browse the repository at this point in the history
  • Loading branch information
koebi committed Oct 18, 2024
1 parent 1aa153e commit 6014e42
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tests/test_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
QgsVectorLayer,
QgsFeature,
QgsGeometry,
QgsRectangle,
)
from qgis.testing import unittest

Expand All @@ -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):
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6014e42

Please sign in to comment.