From 2c72085b43ebbd04ddb6212534ef942100df3b24 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 18 May 2014 03:25:22 +0000 Subject: [PATCH] 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 --- unittests/wtc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unittests/wtc.py b/unittests/wtc.py index 4c5705bc..dfbd7efe 100644 --- a/unittests/wtc.py +++ b/unittests/wtc.py @@ -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