Skip to content
Permalink
Browse files

Improved debug output on test fail

  • Loading branch information
m-kuhn committed May 2, 2018
1 parent b3ed0f2 commit 7b3308dc4aa9160d03e9070697b3b7aa4fc0cb2f
Showing with 2 additions and 2 deletions.
  1. +2 −2 python/testing/__init__.py
@@ -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,
@@ -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]

0 comments on commit 7b3308d

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