def setUp(self): # redirect stdout self.orig_stdout = sys.stdout sys.stdout = cStringIO.StringIO() # initialse base class WXGladeBaseTest.setUp(self) import main import wx # inject mock object for wxMessageBox self._messageBox = [] wx.MessageBox = self.mockMessageBox # create an simply application if not TestGui.app: TestGui.app = wx.PySimpleApp() wx.InitAllImageHandlers() wx.ArtProvider.PushProvider(main.wxGladeArtProvider()) if not TestGui.frame: self.frame = main.wxGladeFrame() # hide all windows self.frame.Hide() self.frame.hide_all() TestGui.frame = self.frame # show dialog "Code generation completed successfully" config.preferences.show_completion = True
def setUpClass(cls): WXGladeBaseTest.setUpClass() xrc2wxg._write_timestamp = False # create an simply application cls.app = wx.PySimpleApp() compat.wx_ArtProviderPush(main.wxGladeArtProvider()) cls.frame = main.wxGladeFrame() # suppress wx error messages cls.nolog = wx.LogNull()
def setUpClass(cls): WXGladeBaseTest.setUpClass() xrc2wxg._write_timestamp = False # create an simply application cls.app = wx.App() cls.locale = wx.Locale(wx.LANGUAGE_DEFAULT) compat.wx_ArtProviderPush(main.wxGladeArtProvider()) import history common.history = history.History() cls.frame = main.wxGladeFrame() # suppress wx error messages cls.nolog = wx.LogNull()