Skip to content
Permalink
Browse files
Make test more tolerant to different GEOS versions
  • Loading branch information
nyalldawson committed May 3, 2021
1 parent 8ac7df6 commit 8edbb6942c60db274013639a3b443754ec140f50
Showing with 5 additions and 4 deletions.
  1. +5 −4 tests/src/python/test_provider_ogr_gpkg.py
@@ -1132,10 +1132,11 @@ def test_SplitFeature(self):

layer = QgsVectorLayer(u'{}'.format(tmpfile) + "|layername=" + "test", 'test', u'ogr')
self.assertEqual(layer.featureCount(), 2)
self.assertEqual([f for f in layer.getFeatures()][0].geometry().asWkt(),
'Polygon ((0.5 0, 0.5 1, 1 1, 1 0, 0.5 0))')
self.assertEqual([f for f in layer.getFeatures()][1].geometry().asWkt(),
'Polygon ((0.5 1, 0.5 0, 0 0, 0 1, 0.5 1))')
g, g2 = [f.geometry() for f in layer.getFeatures()]
g.normalize()
g2.normalize()
self.assertCountEqual([geom.asWkt() for geom in [g, g2]], ['Polygon ((0 0, 0 1, 0.5 1, 0.5 0, 0 0))',
'Polygon ((0.5 0, 0.5 1, 1 1, 1 0, 0.5 0))'])

def testCreateAttributeIndex(self):
tmpfile = os.path.join(self.basetestpath, 'testGeopackageAttributeIndex.gpkg')

0 comments on commit 8edbb69

Please sign in to comment.