From d755518068265b1d53692eb7ff2ae88951c49602 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 10 Aug 2012 04:54:59 +0000 Subject: [PATCH] Various test fixes for MSW git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- unittests/test_fswatcher.py | 3 ++- unittests/test_mdi.py | 2 ++ unittests/test_toolbook.py | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/unittests/test_fswatcher.py b/unittests/test_fswatcher.py index 85260c19..d6d5e4c5 100644 --- a/unittests/test_fswatcher.py +++ b/unittests/test_fswatcher.py @@ -1,6 +1,7 @@ import imp_unittest, unittest import wtc import wx +import os #--------------------------------------------------------------------------- @@ -11,7 +12,7 @@ class fswatcher_Tests(wtc.WidgetTestCase): evtLoop = self.app.GetTraits().CreateEventLoop() activator = wx.EventLoopActivator(evtLoop) # automatically restores the old one watcher = wx.FileSystemWatcher() - watcher.Add(__file__) + watcher.Add(os.getcwd()) watcher.Bind(wx.EVT_FSWATCHER, lambda evt: None) diff --git a/unittests/test_mdi.py b/unittests/test_mdi.py index 1e77b021..4ae759ff 100644 --- a/unittests/test_mdi.py +++ b/unittests/test_mdi.py @@ -24,11 +24,13 @@ class mdi_Tests(wtc.WidgetTestCase): def test_mdiChildFrame1(self): f = wx.MDIParentFrame(None, title="MDI Parent") + f.SetMenuBar(wx.MenuBar()) c = wx.MDIChildFrame(f, title="MDI Child") f.Close() def test_mdiChildFrame2(self): f = wx.MDIParentFrame(None, title="MDI Parent") + f.SetMenuBar(wx.MenuBar()) c = wx.MDIChildFrame() c.Create(f, title="MDI Child") f.Close() diff --git a/unittests/test_toolbook.py b/unittests/test_toolbook.py index 1924f670..6a2f9b7f 100644 --- a/unittests/test_toolbook.py +++ b/unittests/test_toolbook.py @@ -31,16 +31,18 @@ class toolbook_Tests(wtc.WidgetTestCase): def test_toolbook3(self): book = wx.Toolbook(self.frame) - il = wx.ImageList() + il = wx.ImageList(32,32) for name in toolImgFiles: il.Add(wx.Bitmap(name)) book.AssignImageList(il) - + book.AddPage(wx.Panel(book), 'one', imageId=0) book.AddPage(wx.Panel(book), 'two', imageId=1) book.AddPage(wx.Panel(book), 'three', imageId=2) book.AddPage(wx.Panel(book), 'four', imageId=3) + self.myYield() + #---------------------------------------------------------------------------