From 2947a63d5227709d71bbf0051a47ea72ac3254c9 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Sat, 15 Jun 2024 21:51:04 -0700 Subject: [PATCH] Fix report_single_test for cases with NaNs The function was broken by https://github.com/AMReX-Codes/amrex/pull/3823. When a variable contains NaNs, the line used to be "< NaN present >\n", but now it's "< NaN present >" followed by white spaces and then '\n'. In that case, the line is split into three fields and we should skip the last field with just white spaces. --- test_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_report.py b/test_report.py index b5001b7..9c1bdea 100644 --- a/test_report.py +++ b/test_report.py @@ -650,7 +650,7 @@ def report_single_test(suite, test, tests, failure_msg=None): line.strip().replace('<', '<').replace('>', '>')) continue - fields = [q.strip() for q in line.split(" ") if not q == ""] + fields = [q.strip() for q in line.split(" ") if not q.strip() == ""] if fields: if fields[0].startswith("variable"):