From 906aa0bd6896d119bcbabc6e21de31c2171316b9 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 27 Aug 2010 15:48:48 -0400 Subject: Fixed SleekTest compare method to check XML text. Corrected resulting test failures. All pass again. --- tests/sleektest.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/sleektest.py') diff --git a/tests/sleektest.py b/tests/sleektest.py index 801253d3..66535bcb 100644 --- a/tests/sleektest.py +++ b/tests/sleektest.py @@ -504,7 +504,18 @@ class SleekTest(unittest.TestCase): if xml.attrib != other.attrib: return False - # Step 3: Recursively check children + # Step 3: Check text + if xml.text is None: + xml.text = "" + if other.text is None: + other.text = "" + xml.text = xml.text.strip() + other.text = other.text.strip() + + if xml.text != other.text: + return False + + # Step 4: Recursively check children for child in xml: child2s = other.findall("%s" % child.tag) if child2s is None: -- cgit v1.2.3