Improve frame and app cleanup in WidgetTestCase

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@76571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2014-05-18 03:25:22 +00:00
parent 376bbf0822
commit 2c72085b43

View File

@@ -20,8 +20,11 @@ class WidgetTestCase(unittest.TestCase):
def tearDown(self):
def _cleanup():
self.frame.Close()
self.app.ExitMainLoop()
for tlw in wx.GetTopLevelWindows():
if tlw:
tlw.Destroy()
wx.WakeUpIdle()
#self.app.ExitMainLoop()
wx.CallLater(50, _cleanup)
self.app.MainLoop()
del self.app