Skip to content
Permalink
Browse files

test_provider_ogr_gpkg.py: remove stuff that shouldn't have gone in 3…

  • Loading branch information
rouault committed Oct 18, 2016
1 parent 348af7e commit 1b48a7432a32bd1b78e26cd928fdf2aafa790c6b
Showing with 0 additions and 21 deletions.
  1. +0 −21 tests/src/python/test_provider_ogr_gpkg.py
@@ -154,26 +154,5 @@ def testBug15351_commit_closeProvider_closeIter(self):
def testBug15351_commit_closeIter_closeProvider(self):
self.internalTestBug15351('commit_closeIter_closeProvider')

def testSelectSubsetString(self):

tmpfile = os.path.join(self.basetestpath, 'testSelectSubsetString.gpkg')
ds = ogr.GetDriverByName('GPKG').CreateDataSource(tmpfile)
lyr = ds.CreateLayer('test', geom_type=ogr.wkbMultiPolygon)
lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString))
f = ogr.Feature(lyr.GetLayerDefn())
f['foo'] = 'bar'
lyr.CreateFeature(f)
f = None
f = ogr.Feature(lyr.GetLayerDefn())
f['foo'] = 'baz'
lyr.CreateFeature(f)
f = None
ds = None

vl = QgsVectorLayer('{}|layerid=0'.format(tmpfile), 'test', 'ogr')
vl.setSubsetString("SELECT fid, foo FROM test WHERE foo = 'baz'")
got = [feat for feat in vl.getFeatures()]
self.assertEqual( len(got), 1 )

if __name__ == '__main__':
unittest.main()

0 comments on commit 1b48a74

Please sign in to comment.
You can’t perform that action at this time.