Skip to content
Permalink
Browse files

More checks

  • Loading branch information
nyalldawson committed Jun 3, 2018
1 parent 0af5fb9 commit bb2e15c95a64c3e7dbcc9c49a81b7ae8f60ddb0c
Showing with 12 additions and 0 deletions.
  1. +12 −0 tests/src/python/test_provider_ogr_sqlite.py
@@ -323,6 +323,18 @@ def run_checks():
self.assertEqual([field.name() for field in f.fields()], ['fid', 'type', 'value'])
self.assertEqual(f.geometry().asWkt(), 'Point (5 5)')

# filter rect and fids
req = QgsFeatureRequest()
req.setFilterFids([3, 5])
req.setFilterRect(QgsRectangle(4.5, 4.5, 5.5, 5.5))
it = vl.getFeatures(req)
f = QgsFeature()
self.assertTrue(it.nextFeature(f))
self.assertEqual(f.id(), 5)
self.assertEqual(f.attributes(), [5, 2, 16])
self.assertEqual([field.name() for field in f.fields()], ['fid', 'type', 'value'])
self.assertEqual(f.geometry().asWkt(), 'Point (5 5)')

# Ensure that orig_ogc_fid is still retrieved even if attribute subset is passed
req = QgsFeatureRequest()
req.setSubsetOfAttributes([])

0 comments on commit bb2e15c

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