Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make test more tolerant to different GEOS versions
  • Loading branch information
nyalldawson committed May 3, 2021
1 parent 8ac7df6 commit 8edbb69
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/src/python/test_provider_ogr_gpkg.py
Expand Up @@ -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')
Expand Down

0 comments on commit 8edbb69

Please sign in to comment.