aboutsummaryrefslogtreecommitdiff
path: root/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2020-05-01 08:39:45 -0700
committerGravatar GitHub <noreply@github.com> 2020-05-01 08:39:45 -0700
commitf8941d7e4d1a2e8388360a22e1cbf1ef7bcf2cb3 (patch)
tree572927655309cec48803999ba640918413a77292 /Examples/Tests/particles_in_PML/analysis_particles_in_pml.py
parent639cf17fda1d048602c675c5b1808893bd29d73e (diff)
downloadWarpX-f8941d7e4d1a2e8388360a22e1cbf1ef7bcf2cb3.tar.gz
WarpX-f8941d7e4d1a2e8388360a22e1cbf1ef7bcf2cb3.tar.zst
WarpX-f8941d7e4d1a2e8388360a22e1cbf1ef7bcf2cb3.zip
Most fun PR ever: print error and tolerance before ASSERT in CI (#967)
* always print error and tolerance before ASSERT in CI tests * eol * fix typos * more typo * typo
Diffstat (limited to 'Examples/Tests/particles_in_PML/analysis_particles_in_pml.py')
-rwxr-xr-xExamples/Tests/particles_in_PML/analysis_particles_in_pml.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py b/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py
index bf2130665..ce796cdb9 100755
--- a/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py
+++ b/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py
@@ -36,9 +36,12 @@ print( "max_Efield = %s" %max_Efield )
# The field associated with the particle does not have
# the same amplitude in 2d and 3d
if ds.dimensionality == 2:
- assert max_Efield < 0.0003
+ tolerance_abs = 0.0003
elif ds.dimensionality == 3:
- assert max_Efield < 10
+ tolerance_abs = 10
else:
raise ValueError("Unknown dimensionality")
+print("tolerance_abs: " + str(tolerance_abs))
+assert max_Efield < tolerance_abs
+