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@66393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
37 lines
947 B
Python
37 lines
947 B
Python
import unittest2
|
|
import wxPhoenix as wx
|
|
|
|
import warnings
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
class App(unittest2.TestCase):
|
|
|
|
def test_App(self):
|
|
app = wx.App()
|
|
|
|
def test_App_OnInit(self):
|
|
class MyApp(wx.App):
|
|
def OnInit(self):
|
|
self.onInit_called = True
|
|
return True
|
|
app = MyApp()
|
|
self.assertTrue(app.onInit_called)
|
|
|
|
def test_version(self):
|
|
v = wx.version()
|
|
|
|
def test_PySimpleApp(self):
|
|
# wx.PySimpleApp is supposed to be deprecated, make sure it is.
|
|
with warnings.catch_warnings():
|
|
warnings.simplefilter("error")
|
|
with self.assertRaises(DeprecationWarning):
|
|
app = wx.PySimpleApp()
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest2.main()
|