Skip to content

Commit

Permalink
Update tests for OGR getLayers now returning also the geometry column…
Browse files Browse the repository at this point in the history
… name
  • Loading branch information
elpaso committed Sep 8, 2017
1 parent 274cc6c commit 8abf6dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/test_provider_ogr.py
Expand Up @@ -112,7 +112,7 @@ def testMixOfPolygonCurvePolygon(self):
vl = QgsVectorLayer('{}|layerid=0'.format(datasource), 'test', 'ogr')
self.assertTrue(vl.isValid())
self.assertEqual(len(vl.dataProvider().subLayers()), 1)
self.assertEqual(vl.dataProvider().subLayers()[0], '0:testMixOfPolygonCurvePolygon:4:CurvePolygon')
self.assertEqual(vl.dataProvider().subLayers()[0], '0:testMixOfPolygonCurvePolygon:4:CurvePolygon:')

def testMixOfLineStringCompoundCurve(self):

Expand All @@ -128,7 +128,7 @@ def testMixOfLineStringCompoundCurve(self):
vl = QgsVectorLayer('{}|layerid=0'.format(datasource), 'test', 'ogr')
self.assertTrue(vl.isValid())
self.assertEqual(len(vl.dataProvider().subLayers()), 1)
self.assertEqual(vl.dataProvider().subLayers()[0], '0:testMixOfLineStringCompoundCurve:5:CompoundCurve')
self.assertEqual(vl.dataProvider().subLayers()[0], '0:testMixOfLineStringCompoundCurve:5:CompoundCurve:')

def testGpxElevation(self):
# GPX without elevation data
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_provider_ogr_gpkg.py
Expand Up @@ -84,7 +84,7 @@ def testCurveGeometryType(self):
ds = None

vl = QgsVectorLayer('{}'.format(tmpfile), 'test', 'ogr')
self.assertEqual(vl.dataProvider().subLayers(), ['0:test:0:CurvePolygon'])
self.assertEqual(vl.dataProvider().subLayers(), ['0:test:0:CurvePolygon:geom'])
f = QgsFeature()
f.setGeometry(QgsGeometry.fromWkt('POLYGON ((0 0,0 1,1 1,0 0))'))
vl.dataProvider().addFeatures([f])
Expand Down

0 comments on commit 8abf6dc

Please sign in to comment.