Files
Phoenix/unittests/test_lib_mixins_inspection.py
2013-04-10 00:05:41 +00:00

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()