[CMF-checkins] CVS: CMF/CMFSetup/tests - common.py:1.8

Tres Seaver tseaver at zope.com
Thu May 27 00:20:12 EDT 2004


Update of /cvs-repository/CMF/CMFSetup/tests
In directory cvs.zope.org:/tmp/cvs-serv26783/tests

Modified Files:
	common.py 
Log Message:
 - Ease debugging of DOM breakage.


=== CMF/CMFSetup/tests/common.py 1.7 => 1.8 ===
--- CMF/CMFSetup/tests/common.py:1.7	Tue May 25 09:18:22 2004
+++ CMF/CMFSetup/tests/common.py	Thu May 27 00:20:06 2004
@@ -9,7 +9,7 @@
 
 class DOMComparator:
 
-    def _compareDOM( self, found_text, expected_text ):
+    def _compareDOM( self, found_text, expected_text, debug=False ):
 
         from xml.dom.minidom import parseString
         found = parseString( found_text )
@@ -18,6 +18,15 @@
         exml = expected.toxml()
 
         if fxml != exml:
+
+            if debug:
+                zipped = zip( fxml, exml )
+                diff = [ ( i, zipped[i][0], zipped[i][1] )
+                        for i in range( len( zipped ) )
+                        if zipped[i][0] != zipped[i][1]
+                    ]
+                import pdb; pdb.set_trace()
+
             print 'Found:'
             print fxml
             print




More information about the CMF-checkins mailing list