Skip to content
Permalink
Browse files
Add some tests
  • Loading branch information
pblottiere committed Sep 6, 2017
1 parent 8a17a60 commit 76b2b8e
Showing 1 changed file with 10 additions and 0 deletions.
@@ -765,6 +765,16 @@ def testReadExtentOnView(self):

self.assertEqual(vl2.extent(), customExtent)

# but a force update on extent should allow retrieveing the data
# provider extent
vl2.updateExtents()
vl2.readLayerXml(elem, QgsReadWriteContext())
self.assertEqual(vl2.extent(), customExtent)

vl2.updateExtents(force=True)
vl2.readLayerXml(elem, QgsReadWriteContext())
self.assertEqual(vl2.extent(), originalExtent)

def testReadExtentOnTable(self):
# vector layer based on a standard table
vl0 = QgsVectorLayer(self.dbconn + ' sslmode=disable key=\'pk\' srid=4326 type=POLYGON table="qgis_test"."some_poly_data" (geom) sql=', 'test', 'postgres')

0 comments on commit 76b2b8e

Please sign in to comment.