summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-03-16 09:07:01 +0100
committerGitHub <noreply@github.com>2022-03-16 09:07:01 +0100
commit970f5bf5035d8c99b0ff883f984b60cf531dddbe (patch)
tree9778d5a2b474c02d24c4ae7af5e9494e5b7b6b6e /tests
parent3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc (diff)
Fixed #33577 -- Confirmed support for GDAL 3.4.
Diffstat (limited to 'tests')
-rw-r--r--tests/gis_tests/gdal_tests/test_raster.py9
-rw-r--r--tests/gis_tests/inspectapp/tests.py6
2 files changed, 10 insertions, 5 deletions
diff --git a/tests/gis_tests/gdal_tests/test_raster.py b/tests/gis_tests/gdal_tests/test_raster.py
index fd59b57313..5185df2667 100644
--- a/tests/gis_tests/gdal_tests/test_raster.py
+++ b/tests/gis_tests/gdal_tests/test_raster.py
@@ -807,8 +807,13 @@ class GDALBandTests(SimpleTestCase):
band = rs.bands[0]
# Setting attributes in write mode raises exception in the _flush method
- with self.assertRaises(GDALException):
- setattr(band, "nodata_value", 10)
+ try:
+ with self.assertRaises(GDALException):
+ setattr(band, "nodata_value", 10)
+ finally:
+ pam_file = self.rs_path + ".aux.xml"
+ if os.path.isfile(pam_file):
+ os.remove(pam_file)
def test_band_data_setters(self):
# Create in-memory raster and get band
diff --git a/tests/gis_tests/inspectapp/tests.py b/tests/gis_tests/inspectapp/tests.py
index d9b3cf985f..6ff3a33fc4 100644
--- a/tests/gis_tests/inspectapp/tests.py
+++ b/tests/gis_tests/inspectapp/tests.py
@@ -143,8 +143,8 @@ class OGRInspectTest(SimpleTestCase):
# The ordering of model fields might vary depending on several factors
# (version of GDAL, etc.).
- if connection.vendor == "sqlite":
- # SpatiaLite introspection is somewhat lacking (#29461).
+ if connection.vendor == "sqlite" and GDAL_VERSION < (3, 4):
+ # SpatiaLite introspection is somewhat lacking on GDAL < 3.4 (#29461).
self.assertIn(" f_decimal = models.CharField(max_length=0)", model_def)
else:
self.assertIn(
@@ -156,7 +156,7 @@ class OGRInspectTest(SimpleTestCase):
# Probably a bug between GDAL and MariaDB on time fields.
self.assertIn(" f_datetime = models.DateTimeField()", model_def)
self.assertIn(" f_time = models.TimeField()", model_def)
- if connection.vendor == "sqlite":
+ if connection.vendor == "sqlite" and GDAL_VERSION < (3, 4):
self.assertIn(" f_float = models.CharField(max_length=0)", model_def)
else:
self.assertIn(" f_float = models.FloatField()", model_def)