Skip to content
Permalink
Browse files
Add test coverage for this regression
  • Loading branch information
nirvn authored and github-actions committed Nov 5, 2021
1 parent 6544cfd commit e8efd91ee14ef82b2a3dd8079dca3941fe36c717
Showing with 14 additions and 0 deletions.
  1. +14 −0 tests/src/python/test_provider_spatialite.py
  2. BIN tests/testdata/views_test.sqlite
@@ -1634,6 +1634,20 @@ def testTransactions(self):
self.assertEqual(vl.dataProvider().defaultValueClause(0), '')
self.assertEqual(vl.dataProvider().defaultValue(0), 1)

def testViewsExtentFilter(self):
"""Test extent filtering of a views-based spatialite layer"""

vl = QgsVectorLayer("dbname='%s' table=\"vs_controle_ok_nok\" (geom)" %
os.path.join(TEST_DATA_DIR, "views_test.sqlite"), "vs_controle_ok_nok", "spatialite")
self.assertTrue(vl.isValid())

feature = QgsFeature()
rect = QgsRectangle(822733, 6699265, 829351, 6707266)
it = vl.getFeatures(rect)
it.nextFeature(feature)

self.assertTrue(feature.isValid())


if __name__ == '__main__':
unittest.main()
Binary file not shown.

0 comments on commit e8efd91

Please sign in to comment.