From 5e7e49fc8f73a60da01f27c5a7faa37f191f5a24 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Fri, 26 Oct 2018 13:06:00 -0400 Subject: [PATCH] output full precision --- python/testing/__init__.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/python/testing/__init__.py b/python/testing/__init__.py index c33d4dd3fc9a..39080ecbe01a 100644 --- a/python/testing/__init__.py +++ b/python/testing/__init__.py @@ -218,12 +218,22 @@ def checkGeometriesEqual(self, geom0, geom1, geom0_id, geom1_id, use_asserts=Fal if use_asserts: _TestCase.assertTrue( self, - equal, - 'Features (Expected fid: {}, Result fid: {}) differ in geometry: \n\n Expected geometry:\n {}\n\n Result geometry:\n {}'.format( + equal, '' + ' Features (Expected fid: {}, Result fid: {}) differ in geometry with method {}: \n\n' + ' At given precision ({}):\n' + ' Expected geometry: {}\n' + ' Result geometry: {}\n\n' + ' Full precision:\n' + ' Expected geometry : {}\n' + ' Result geometry: {}\n\n'.format( geom0_id, geom1_id, + 'geos' if topo_equal_check else 'wkt', + precision, geom0.constGet().asWkt(precision) if not geom0.isNull() else 'NULL', - geom1.constGet().asWkt(precision) if not geom1.isNull() else 'NULL' + geom1.constGet().asWkt(precision) if not geom1.isNull() else 'NULL', + geom0.constGet().asWkt() if not geom1.isNull() else 'NULL', + geom1.constGet().asWkt() if not geom0.isNull() else 'NULL' ) ) else: