From dbdf35be778bb467bc92c3851109cf3aa2bbcfd0 Mon Sep 17 00:00:00 2001 From: Andrea Giudiceandrea Date: Wed, 7 Feb 2024 11:29:16 +0100 Subject: [PATCH] gdal:fillnodata Skip testing NO_MASK parameter if GDAL >= 3.4.0 --- .../tests/GdalAlgorithmsRasterTest.py | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/python/plugins/processing/tests/GdalAlgorithmsRasterTest.py b/python/plugins/processing/tests/GdalAlgorithmsRasterTest.py index 6f34432f577..3adc7158f77 100644 --- a/python/plugins/processing/tests/GdalAlgorithmsRasterTest.py +++ b/python/plugins/processing/tests/GdalAlgorithmsRasterTest.py @@ -2305,16 +2305,17 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest): ['gdal_fillnodata.py', f'{source} {outsource} -md 10 -b 1 -of GTiff']) - # nomask true - self.assertEqual( - alg.getConsoleCommands({'INPUT': source, - 'BAND': 1, - 'DISTANCE': 10, - 'ITERATIONS': 0, - 'NO_MASK': True, - 'OUTPUT': outsource}, context, feedback), - ['gdal_fillnodata.py', - f'{source} {outsource} -md 10 -b 1 -nomask -of GTiff']) + if not GdalUtils.version() >= 3040000: + # nomask true + self.assertEqual( + alg.getConsoleCommands({'INPUT': source, + 'BAND': 1, + 'DISTANCE': 10, + 'ITERATIONS': 0, + 'NO_MASK': True, + 'OUTPUT': outsource}, context, feedback), + ['gdal_fillnodata.py', + f'{source} {outsource} -md 10 -b 1 -nomask -of GTiff']) # creation options self.assertEqual(