From 1f22586f0723ceb36dacc1509da69b856f103f72 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 16 Dec 2024 13:49:05 +1000 Subject: [PATCH 1/2] Disable broken test for automatic transaction groups on GDAL >= 3.5 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 Parties interested in seeing this test resurrected are welcome to submit fixes. --- tests/src/python/test_qgsvectorlayereditbuffer.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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) From 28c88ca3ec57e85f43198048d46b4a2b96e61459 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 16 Dec 2024 13:50:33 +1000 Subject: [PATCH 2/2] Run test on qt6 --- .ci/test_blocklist_qt6.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/.ci/test_blocklist_qt6.txt b/.ci/test_blocklist_qt6.txt index c1cb435c5b0b..73704879b19c 100644 --- a/.ci/test_blocklist_qt6.txt +++ b/.ci/test_blocklist_qt6.txt @@ -54,7 +54,6 @@ PyQgsRasterLayerRenderer PyQgsShapefileProvider PyQgsSpatialiteProvider PyQgsSymbolLayerReadSld -PyQgsVectorLayerEditBuffer PyQgsLayerDefinition PyQgsSettings PyQgsSettingsEntry