mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-09-05 17:30:26 +02:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
39 lines
1019 B
Python
39 lines
1019 B
Python
import imp_unittest, unittest
|
|
import wx
|
|
import wx.lib.mixins.inspection as wit
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class wit_TestCase(unittest.TestCase):
|
|
|
|
def test_App(self):
|
|
app = wit.InspectableApp()
|
|
|
|
def test_App_OnInit(self):
|
|
class MyApp(wit.InspectableApp):
|
|
def OnInit(self):
|
|
self.onInit_called = True
|
|
self.ShowInspectionTool()
|
|
return True
|
|
app = MyApp()
|
|
self.assertTrue(app.onInit_called)
|
|
|
|
def test_Wit_Mixin(self):
|
|
class MyApp(wx.App, wit.InspectionMixin):
|
|
def OnInit(self):
|
|
self.onInit_called = True
|
|
self.Init()
|
|
self.ShowInspectionTool()
|
|
return True
|
|
app = MyApp()
|
|
self.assertTrue(app.onInit_called)
|
|
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|