From a5f605e42c7fbda376c8e4f8ad4c983d5512af3b Mon Sep 17 00:00:00 2001 From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de> Date: Mon, 23 Mar 2015 08:27:21 +0000 Subject: [PATCH] [fuzzycompare] fixed error occuring with last commit, that "test passed" was printed even though the test failed and output of the corresponding vtu file paths was suppressed reviewed by Beatrix git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14421 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- bin/fuzzycomparevtu.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/fuzzycomparevtu.py b/bin/fuzzycomparevtu.py index 5375f7082b..e58387748b 100644 --- a/bin/fuzzycomparevtu.py +++ b/bin/fuzzycomparevtu.py @@ -9,6 +9,7 @@ def isFuzzyEqualXml(xml1, xml2, absolute, relative): # fuzzy compare of XML nodes def isFuzzyEqualNode(node1, node2, absolute, relative): + noError = True if node1.tagName != node2.tagName: print 'The name of the node differs in ', node1.tagName, ' and ', node2.tagName return False @@ -24,10 +25,12 @@ def isFuzzyEqualNode(node1, node2, absolute, relative): return False if node1child.nodeType == node1child.TEXT_NODE and not isFuzzyEqualText(node1child.data, node2child.data, absolute, relative): print 'Data differs in parameter ', node2.attributes.items(), ' at node ', node2child.nodeType + noError = False continue if node1child.nodeType == node1child.ELEMENT_NODE and not isFuzzyEqualNode(node1child, node2child, absolute, relative): - return False - return True + noError = False + continue + return noError # fuzzy compare of text consisting of whitespace separated numbers def isFuzzyEqualText(text1, text2, absolute, relative): -- GitLab