Skip to content
Browse files

Make test layer comparison handle different order of features

  • Loading branch information
nyalldawson committed Jul 29, 2016
1 parent fda93df commit f449bf236198ced18bbd7078144f12a9aab77cd0
Showing with 4 additions and 1 deletion.
  1. +4 −1 python/testing/
@@ -73,7 +73,10 @@ def assertLayersEqual(self, layer_expected, layer_result, **kwargs):
except KeyError:
precision = 14

for feats in zip(layer_expected.getFeatures(request), layer_result.getFeatures(request)):
expected_features = sorted(layer_expected.getFeatures(request), key=lambda f:
result_features = sorted(layer_expected.getFeatures(request), key=lambda f:

for feats in zip(expected_features, result_features):
if feats[0].hasGeometry():
geom0 = feats[0].geometry().geometry().asWkt(precision)

0 comments on commit f449bf2

Please sign in to comment.
You can’t perform that action at this time.