From a194b909f73c44703b013b39dbcead0f278a8ba6 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Thu, 16 Dec 2021 18:58:30 -0800 Subject: Generalize Analysis Scripts: Number of Digits (plt) (#2683) * Update Scripts to Handle New File Names * Use glob in Analysis of Collision Tests * Use rstrip in Analysis of Collision Tests * Regex: Match ends-in-digits Thanks Phil! :) Co-authored-by: Edoardo Zoni Co-authored-by: Phil Miller --- Examples/Tests/photon_pusher/analysis_photon_pusher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Examples/Tests/photon_pusher/analysis_photon_pusher.py') diff --git a/Examples/Tests/photon_pusher/analysis_photon_pusher.py b/Examples/Tests/photon_pusher/analysis_photon_pusher.py index 181e60751..d9b330514 100755 --- a/Examples/Tests/photon_pusher/analysis_photon_pusher.py +++ b/Examples/Tests/photon_pusher/analysis_photon_pusher.py @@ -9,6 +9,7 @@ import yt import numpy as np +import os import sys sys.path.insert(1, '../../../../warpx/Regression/Checksum/') import checksumAPI @@ -104,7 +105,7 @@ def check(): assert ((max(disc_pos) <= tol_pos) and (max(disc_mom) <= tol_mom)) - test_name = filename[:-9] # Could also be os.path.split(os.getcwd())[1] + test_name = os.path.split(os.getcwd())[1] checksumAPI.evaluate_checksum(test_name, filename) # This function generates the input file to test the photon pusher. -- cgit v1.2.3