Skip to content

Commit

Permalink
Adapt test to GDAL 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Sep 30, 2021
1 parent 0c4d0ea commit 279a892
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/src/python/test_provider_ogr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2304,7 +2304,12 @@ def testGeoJsonFieldOrder(self):
self.assertEqual(features[1].attribute('C'), 'C')

self.assertTrue(vl.commitChanges())
self.assertEqual(vl.fields().names(), ['A', 'C', 'B'])

# This has been fixed in GDAL >= 3.4
if int(gdal.VersionInfo('VERSION_NUM')) >= GDAL_COMPUTE_VERSION(3, 4, 0):
self.assertEqual(vl.fields().names(), ['A', 'B', 'C'])
else:
self.assertEqual(vl.fields().names(), ['A', 'C', 'B'])

features = [f for f in vl.getFeatures()]

Expand Down
Binary file modified tests/testdata/curved_polys.gpkg
Binary file not shown.
Binary file modified tests/testdata/domains.gpkg
Binary file not shown.
Binary file modified tests/testdata/mixed_layers.gpkg
Binary file not shown.

0 comments on commit 279a892

Please sign in to comment.