- Revision
- 16089
- Author
- john
- Date
- 2007-12-08 11:05:42 -0800 (Sat, 08 Dec 2007)
Log Message
Improve some error messages to narrow down test failures
Modified Paths
Diff
Modified: trunk/chandler/parcels/osaf/framework/script_recording/script_lib.py (16088 => 16089)
--- trunk/chandler/parcels/osaf/framework/script_recording/script_lib.py 2007-12-08 03:57:23 UTC (rev 16088) +++ trunk/chandler/parcels/osaf/framework/script_recording/script_lib.py 2007-12-08 19:05:42 UTC (rev 16089) @@ -60,7 +60,8 @@ assert (isinstance (sentToWidget, wx.Window) or isinstance (sentToWidget, wx.Menu) or isinstance (sentToWidget, wx.MenuItem) or - isinstance (sentToWidget, wx.ToolBarTool), "sentToWidget is", sentToWidget) + isinstance (sentToWidget, wx.ToolBarTool), \ + "event %d -- Unexpected type of widget: sentTo is %s; sendToWidget is %s" % (eventNumber, sentTo, str(sentToWidget))) if isinstance (sentToWidget, wx.ToolBarTool): assert sentToWidget.IsControl() @@ -95,7 +96,9 @@ if associatedBlock is not None: id = Block.findBlockByName (associatedBlock).widget.GetId() else: - id = sentToWidget.GetId() + GetIdMethod = getattr (sentToWidget, "GetId", None) + assert GetIdMethod is not None, "event %d -- Unexpected widget, doesn't have GetId: sentTo is %s; sendToWidget is %s" % (eventNumber, sentTo, str(sentToWidget)) + id = GetIdMethod() event.SetId (id) # Special case clicks on checkboxes to toggle the widget's value
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
