From 5a98d13a5e3977fc586d0eb9e329b80b202073e4 Mon Sep 17 00:00:00 2001 From: Dan Guest <dguest@cern.ch> Date: Fri, 6 Dec 2019 10:31:05 +0100 Subject: [PATCH] NAN == NAN for regression testing --- Tools/PyUtils/python/scripts/diff_root_files.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tools/PyUtils/python/scripts/diff_root_files.py b/Tools/PyUtils/python/scripts/diff_root_files.py index d3216a0ec3c..8566e84e532 100644 --- a/Tools/PyUtils/python/scripts/diff_root_files.py +++ b/Tools/PyUtils/python/scripts/diff_root_files.py @@ -11,6 +11,8 @@ __author__ = "Sebastien Binet" ### imports ------------------------------------------------------------------- import PyUtils.acmdlib as acmdlib +from math import isnan + ### globals ------------------------------------------------------------------- g_ALLOWED_MODES = ('summary', 'semi-detailed', 'detailed') @@ -290,6 +292,11 @@ def main(args): if d_new: tree_name, jentry, name, inew = d_new + # for regression testing we should have NAN == NAN + if isnan(iold) and isnan(inew): + n_good += 1 + continue + # FIXME: that's a plain (temporary?) hack if name[-1] in args.known_hacks: continue -- GitLab