Skip to content
Permalink
Browse files
Update tests for OGR getLayers now returning also the geometry column…
… 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.
@@ -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):

@@ -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
@@ -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])

0 comments on commit 8abf6dc

Please sign in to comment.