Skip to content
Permalink
Browse files

Add core unit test

  • Loading branch information
pblottiere authored and nyalldawson committed Oct 1, 2018
1 parent 7681d30 commit 80e19b63280b54ffbc3ab5347872af7fdf57131c
@@ -280,6 +280,17 @@ def testSelectSubsetString(self):
got = [feat for feat in vl.getFeatures()]
self.assertEqual(len(got), 1)

testdata_path = unitTestDataPath('provider')
gpkg = os.path.join(testdata_path, 'bug_19826.gpkg')
vl = QgsVectorLayer('{}|layerid=0'.format(gpkg, 'test', 'ogr'))
vl.setSubsetString("name = 'two'")
got = [feat for feat in vl.getFeatures()]
self.assertEqual(len(got), 1)

attributes = got[0].attributes()
self.assertEqual(attributes[0], 2)
self.assertEqual(attributes[1], 'two')

def testStyle(self):

# First test with invalid URI
Binary file not shown.

0 comments on commit 80e19b6

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