"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/src/python/test_provider_postgres.py" between
QGIS-final-3_10_11.tar.gz and QGIS-final-3_10_12.tar.gz

About: QGIS (Quantum GIS) is a Geographic Information System that supports vector, raster, and database formats. Long-term release (3.10.x series).

test_provider_postgres.py  (QGIS-final-3_10_11):test_provider_postgres.py  (QGIS-final-3_10_12)
skipping to change at line 1934 skipping to change at line 1934
self.assertEqual(f['cnt'], -220) self.assertEqual(f['cnt'], -220)
f = next(l.getFeatures(QgsFeatureRequest().setFilterFid(added[1].id( )))) f = next(l.getFeatures(QgsFeatureRequest().setFilterFid(added[1].id( ))))
self.assertTrue(f.isValid()) self.assertTrue(f.isValid())
self.assertEqual(f['cnt'], 330) self.assertEqual(f['cnt'], 330)
else: else:
# expect fail # expect fail
self.assertFalse(l.dataProvider().addFeatures([f1, f2]), self.assertFalse(l.dataProvider().addFeatures([f1, f2]),
'Provider reported no AddFeatures capability, but r eturned true to addFeatures') 'Provider reported no AddFeatures capability, but r eturned true to addFeatures')
def test_postgis_geometry_filter(self):
"""Make sure the postgres provider only returns one matching geometry re
cord and no polygons etc."""
vl = QgsVectorLayer(self.dbconn + ' srid=4326 type=POINT table="qgis_tes
t"."geometries_table" (geom) sql=', 'test', 'postgres')
ids = [f.id() for f in vl.getFeatures()]
self.assertEqual(ids, [2])
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
 End of changes. 1 change blocks. 
0 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)