Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable broken test for automatic transaction groups on GDAL >= 3.5 #59910

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .ci/test_blocklist_qt6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ PyQgsPalLabelingPlacement
PyQgsRasterAttributeTable
PyQgsRasterLayerRenderer
PyQgsSymbolLayerReadSld
PyQgsVectorLayerEditBuffer
PyQgsLayerDefinition
PyQgsSettings
PyQgsSettingsEntry
Expand Down
12 changes: 11 additions & 1 deletion tests/src/python/test_qgsvectorlayereditbuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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)


Expand Down
Loading