diff --git a/tests/src/python/test_qgsvectorlayereditbuffer.py b/tests/src/python/test_qgsvectorlayereditbuffer.py index 9944664d98aa..196f20052d94 100644 --- a/tests/src/python/test_qgsvectorlayereditbuffer.py +++ b/tests/src/python/test_qgsvectorlayereditbuffer.py @@ -11,6 +11,7 @@ __copyright__ = "Copyright 2016, The QGIS Project" import os +from osgeo import gdal from qgis.PyQt.QtCore import QTemporaryDir, QVariant from qgis.PyQt.QtTest import QSignalSpy @@ -31,6 +32,10 @@ start_app() +def GDAL_COMPUTE_VERSION(maj, min, rev): + return (maj) * 1000000 + (min) * 10000 + (rev) * 100 + + def createEmptyLayer(): layer = QgsVectorLayer( "Point?field=fldtxt:string&field=fldint:integer", "addfeat", "memory" @@ -843,7 +848,12 @@ def _check_feature(wkt): self.assertEqual(f.attribute(2), None) _test(Qgis.TransactionMode.Disabled) - _test(Qgis.TransactionMode.AutomaticGroups) + + # THIS FUNCTIONALITY IS BROKEN ON NEWER GDAL VERSIONS, DUE TO INCORRECT + # assumptions at time of development. See https://github.com/qgis/QGIS/pull/59797#issuecomment-2544133498 + if int(gdal.VersionInfo("VERSION_NUM")) < GDAL_COMPUTE_VERSION(3, 5, 0): + _test(Qgis.TransactionMode.AutomaticGroups) + _test(Qgis.TransactionMode.BufferedGroups)