mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 12:00:13 +01:00
Gobs and gobs of changes, and tons of progress made. Can now create a wx.App, show a wx.Frame, run the MainLoop, bind event handlers and dispatch the events to the handler! YeeHa!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import unittest2
|
||||
import wxPhoenix as wx
|
||||
|
||||
import warnings
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
@@ -10,12 +11,10 @@ class App(unittest2.TestCase):
|
||||
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)
|
||||
|
||||
@@ -23,7 +22,11 @@ class App(unittest2.TestCase):
|
||||
v = wx.version()
|
||||
|
||||
def test_PySimpleApp(self):
|
||||
app = wx.PySimpleApp()
|
||||
# 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()
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user