More test cases and handle __doc__ == None

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-05-18 20:14:14 +00:00
parent 5b65f1364d
commit 2f1189cf1a
2 changed files with 16 additions and 9 deletions

View File

@@ -256,13 +256,15 @@ class LayoutTestFrame(wx.Frame):
expr = "w = %s.%s( testPanel, %s )" % (moduleName, className, parameters)
self.expression.SetValue(expr)
docstring = ""
docstring = None
try:
docstring = eval("%s.%s.__init__.__doc__" % (moduleName, className))
except:
pass
self.docstring.SetValue(docstring)
if docstring is not None:
self.docstring.SetValue(docstring)
else:
self.docstring.SetValue("")
def OnEnableDestroy(self, evt):
evt.Enable(self.testWidget is not None)