home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.5)
-
- import unittest
- import util
- import struct
- import actionIDs
- import time
- import sys
- import wx
- popupActions = [
- actionIDs.ShowBuddyList,
- actionIDs.ShowMenuBar,
- actionIDs.SetStatus,
- actionIDs.SetStatusCustom]
-
- class MenubarTestingSuite(unittest.TestCase):
-
- def setUp(self):
- wx.GetApp().testing = True
-
-
- def tearDown(self):
- wx.GetApp().testing = False
-
-
- def testHandlers(self):
- app = wx.GetApp()
- for action in dir(actionIDs):
- app.event_fired = None
- if action.startswith('__'):
- continue
-
- id = getattr(actionIDs, action, -1)
- self.assert_(action != -1)
- if isinstance(id, int) and not (id == wx.ID_EXIT) and id not in popupActions:
- print 'Firing handler for id=%r' % id
- app.fire_event_for_action(id)
- time.sleep(0.1)
- self.assert_(app.event_fired, 'No event fired for action %s' % action)
- continue
-
-
-
- if __name__ == '__main__':
- unittest.main()
-
-