Skip to content

Commit

Permalink
Fix processing tests weren't actually comparing resultant features
Browse files Browse the repository at this point in the history
.... oops (my fault - copy/paste error)
  • Loading branch information
nyalldawson committed Nov 6, 2016
1 parent eefa711 commit 143c18d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/testing/__init__.py
Expand Up @@ -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():
Expand All @@ -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__']
Expand Down

0 comments on commit 143c18d

Please sign in to comment.