Title: [commits] (john) [16001] improve error message to narrow down tinderbox failure
Revision
16001
Author
john
Date
2007-11-30 18:28:07 -0800 (Fri, 30 Nov 2007)

Log Message

improve error message to narrow down tinderbox failure

Modified Paths

Diff

Modified: trunk/chandler/parcels/osaf/framework/script_recording/script_lib.py (16000 => 16001)

--- trunk/chandler/parcels/osaf/framework/script_recording/script_lib.py	2007-12-01 01:34:16 UTC (rev 16000)
+++ trunk/chandler/parcels/osaf/framework/script_recording/script_lib.py	2007-12-01 02:28:07 UTC (rev 16001)
@@ -54,7 +54,8 @@
         else:
             windowName = ""
 
-    sentToWidget = nameToWidget (properties ["sentTo"])
+    sentTo = properties ["sentTo"]
+    sentToWidget = nameToWidget (sentTo)
 
     assert (isinstance (sentToWidget, wx.Window) or
             isinstance (sentToWidget, wx.Menu) or
@@ -86,7 +87,7 @@
         position = attributes ["Position"]
         event = wx.grid.GridEvent (-1,
                                    eventType.evtType[0],
-                                   Block.findBlockByName (properties ["sentTo"]).widget,
+                                   Block.findBlockByName (sentTo).widget,
                                    row = attributes ["Row"],
                                    col = attributes ["Col"],
                                    x = position [0], y = position [1])
@@ -192,8 +193,8 @@
                     assert lastWidgetValue.startswith (u"Welcome to Chandler 0.7.dev-r")
                 else:
                     assert value == lastWidgetValue,\
-                           'event %d -- widget\'s value, "%s" doesn\'t match the value when the script was recorded: "%s"'\
-                            % (eventNumber, value, lastWidgetValue)
+                           'event %d -- widget %s value, "%s" doesn\'t match the value when the script was recorded: "%s"'\
+                            % (eventNumber, sentTo, value, lastWidgetValue)
 
         # Keep track of the last widget. Use Id because widget can be deleted
 
@@ -222,7 +223,7 @@
                         focusWindowName = ""
                     assert False, \
                            "event %d -- SetFocus failed; Focus is: %s; expecting: %s; sapplication.IsActive() is %s" \
-                           % (eventNumber, focusWindowName, properties ["sentTo"], str(application.IsActive()))
+                           % (eventNumber, focusWindowName, sentTo, str(application.IsActive()))
 
     else:
         if wx.Platform != "__WXMSW__" or eventType not in ignoreMSWEvents:




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to