Skip to content
Permalink
Browse files

Fix processing tests weren't actually comparing resultant features

.... oops (my fault - copy/paste error)
  • Loading branch information
nyalldawson committed Nov 6, 2016
1 parent eefa711 commit 143c18da6feb89624817ad660128a4e23f9a26ab
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/testing/__init__.py
@@ -78,7 +78,7 @@ def assertLayersEqual(self, layer_expected, layer_result, **kwargs):
precision = 14

expected_features = sorted(layer_expected.getFeatures(request), key=lambda f: f.id())
result_features = sorted(layer_expected.getFeatures(request), key=lambda f: f.id())
result_features = sorted(layer_result.getFeatures(request), key=lambda f: f.id())

for feats in zip(expected_features, result_features):
if feats[0].hasGeometry():
@@ -105,7 +105,7 @@ def assertLayersEqual(self, layer_expected, layer_result, **kwargs):
attr_result = feats[1][field_expected.name()]
field_result = [fld for fld in layer_expected.fields().toList() if fld.name() == field_expected.name()][0]
try:
cmp = compare['fields'][field1.name()]
cmp = compare['fields'][field_expected.name()]
except KeyError:
try:
cmp = compare['fields']['__all__']

0 comments on commit 143c18d

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