From 1e8895275bf716d4dec826582f2d24c36fb65680 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Keck <jean-baptiste.keck@imag.fr> Date: Sun, 9 Dec 2018 21:38:53 +0100 Subject: [PATCH] fixed test --- hysop/operator/tests/test_directional_advection.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hysop/operator/tests/test_directional_advection.py b/hysop/operator/tests/test_directional_advection.py index 13184b088..9463d3745 100644 --- a/hysop/operator/tests/test_directional_advection.py +++ b/hysop/operator/tests/test_directional_advection.py @@ -217,11 +217,14 @@ class TestDirectionalAdvectionOperator(object): if npw.any(d > 1e-1): print 'FATAL ERROR: Could not match analytic advection.' print 'DSOUT' - print dsout.sdata[dsout.compute_slices] + for output in dsout: + print output.sdata[output.compute_slices] print 'DSREF' - print dsref.sdata[dsref.compute_slices] + for ref in dsref: + print ref.sdata[ref.compute_slices] print 'DSREF - DSOUT' - print (dsout.sdata[dsout.compute_slices].get() - dsref.sdata[dsref.compute_slices].get()) + for (output, ref) in zip(dsout, dsref): + print (output.sdata[output.compute_slices].get() - ref.sdata[ref.compute_slices].get()) msg='Test failed with V={}, k={}, dxk={}, inter-field L2 distances are {}.' msg=msg.format(Vi, k, to_tuple(dxk, cast=float), to_tuple(d, cast=float)) raise RuntimeError(msg) -- GitLab