Skip to content

Commit

Permalink
Improved debug output on test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 2, 2018
1 parent b3ed0f2 commit 7b3308d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def sort_by_pk_or_fid(f):
self,
geom0,
geom1,
'Features {}/{} differ in geometry: \n\n {}\n\n vs \n\n {}'.format(
'Features (Expected fid: {}, Result fid: {}) differ in geometry: \n\n Expected geometry:\n {}\n\n Result geometry:\n {}'.format(
feats[0].id(),
feats[1].id(),
geom0,
Expand All @@ -157,7 +157,7 @@ def sort_by_pk_or_fid(f):
_TestCase.assertIn(
self,
field_expected.name().lower(),
(name.lower() for name in feats[1].fields().names()))
[name.lower() for name in feats[1].fields().names()])

attr_result = feats[1][field_expected.name()]
field_result = [fld for fld in layer_expected.fields().toList() if fld.name() == field_expected.name()][0]
Expand Down

0 comments on commit 7b3308d

Please sign in to comment.