fix for test app from skv. thanks
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Thu, 01 Mar 2018 14:28:55 +0100
changeset 1961 b4a1ba9dbaf3
parent 1960 372ec456664c
child 1973 cc7a46953471
child 1974 b3a110daa135
fix for test app from skv. thanks
tests/tools/test_application.py
--- a/tests/tools/test_application.py	Thu Mar 01 10:28:17 2018 +0100
+++ b/tests/tools/test_application.py	Thu Mar 01 14:28:55 2018 +0100
@@ -41,7 +41,7 @@
 
 class UserApplicationTest(unittest.TestCase):
     def InstallExceptionHandler(self):
-        def handle_exception(e_type, e_value, e_traceback):
+        def handle_exception(e_type, e_value, e_traceback, exit=False):
             # traceback.print_exception(e_type, e_value, e_traceback)
             self.exc_info = [e_type, e_value, e_traceback]
         self.exc_info = None
@@ -89,7 +89,9 @@
         # disable default exception handler in Beremiz
         self.app.InstallExceptionHandler = lambda: None
         self.InstallExceptionHandler()
+        self.app.handle_exception = sys.excepthook
         self.app.PreStart()
+        self.ProcessEvents()
         self.app.frame.Show()
         self.ProcessEvents()
         self.app.frame.ShowFullScreen(True)