Skip to content

Commit 76f2c9d

Browse files
committed
Skip numpy test where not supported.
1 parent 08fe827 commit 76f2c9d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

autotest/utilities/test_gdalalg_raster_viewshed.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# SPDX-License-Identifier: MIT
1212
###############################################################################
1313

14-
import numpy as np
14+
import gdaltest
1515
import pytest
1616

1717
from osgeo import gdal
@@ -276,6 +276,11 @@ def test_gdalalg_raster_mode_ground(viewshed_input):
276276

277277
def test_gdalalg_raster_sd(viewshed_input, viewshed_sd_input):
278278

279+
# Some test configurations don't support numpy. This will skip those
280+
# configurations.
281+
np = pytest.importorskip("numpy")
282+
gdaltest.importorskip_gdal_array()
283+
279284
alg = get_alg()
280285
alg["input"] = viewshed_input
281286
alg["sd-filename"] = viewshed_sd_input

0 commit comments

Comments
 (0)