Skip to content

Commit 3773bb9

Browse files
committed
skip if gdal 3.9 and lower
1 parent c60974d commit 3773bb9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/processing/tools/test_util_functions.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import math
2-
import unittest
32

43
import numpy as np
54
import pytest
65
from osgeo import gdal, osr
7-
from qgis.core import QgsGeometry, QgsLineString, QgsPoint, QgsPointXY, QgsRasterLayer, QgsVectorLayer
6+
from qgis.core import QgsGeometry, QgsLineString, QgsPoint, QgsPointXY, QgsRasterLayer
87

98
from los_tools.processing.tools.util_functions import (
109
bilinear_interpolated_value,
@@ -48,9 +47,13 @@ def small_raster_example() -> QgsRasterLayer:
4847
return small_raster
4948

5049

50+
@pytest.mark.skipif(int(gdal.VersionInfo()) < 3100000, reason="GDAL version is too low")
5151
def test_bilinear_interpolated_value_small_raster(small_raster_example: QgsRasterLayer):
5252
small_raster_dp = small_raster_example.dataProvider()
5353

54+
assert small_raster_dp
55+
assert small_raster_dp.isValid()
56+
5457
bilinear_value = bilinear_interpolated_value(small_raster_dp, QgsPointXY(1, 1))
5558
assert bilinear_value == pytest.approx(2.5)
5659

0 commit comments

Comments
 (0)