From aa73b31f66d6ee6bf79f75d923eb481cb228d176 Mon Sep 17 00:00:00 2001
From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de>
Date: Tue, 11 Feb 2014 15:48:10 +0000
Subject: [PATCH] [bin] updated fuzzycompare, now parameter and exact node
 causing the failure will be printed, corrected typos

reviewed by gruenich


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@12459 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 bin/fuzzycomparevtu.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/fuzzycomparevtu.py b/bin/fuzzycomparevtu.py
index fc7fb777d8..29d1f1967a 100644
--- a/bin/fuzzycomparevtu.py
+++ b/bin/fuzzycomparevtu.py
@@ -20,10 +20,10 @@ def isFuzzyEqualNode(node1, node2, absolute, relative):
         return False
     for node1child, node2child in zip(node1.childNodes, node2.childNodes):
         if node1child.nodeType != node2child.nodeType:
-            print 'Node type differs in ', note1.tagName
+            print 'Node type differs in ', node1.tagName
             return False
         if node1child.nodeType == node1child.TEXT_NODE and not isFuzzyEqualText(node1child.data, node2child.data, absolute, relative):
-            print 'Data differs in node ', node1.tagName
+            print 'Data differs in parameter ', node2.attributes.items(), ' at node ', node2child.nodeType
             return False
         if node1child.nodeType == node1child.ELEMENT_NODE and not isFuzzyEqualNode(node1child, node2child, absolute, relative):
             return False
@@ -42,13 +42,13 @@ def isFuzzyEqualText(text1, text2, absolute, relative):
         number2 = float(number2)
         if (abs(number1 - number2) > absolute 
             and (number2 == 0.0 or abs(abs(number1 / number2) - 1.0) > relative)):
-            print 'Difference to large between', number1, ' and ', number2
+            print 'Difference is too large between', number1, ' and ', number2
             return False
     return True
 
 # main programm
 # handle arguments and print help message
-parser = argparse.ArgumentParser(description='Fuzzy compare two VTK\
+parser = argparse.ArgumentParser(description='Fuzzy compare of two VTK\
     (Visualization Toolkit) files. The files are accepted if for every\
     value the difference is below the absolute error or below the\
     relative error or below both.')
-- 
GitLab