--- a/tests/ide_tests/wx_widgets.pytest/test_CustomIntCtrl.py Wed May 15 08:59:38 2024 +0200
+++ b/tests/ide_tests/wx_widgets.pytest/test_CustomIntCtrl.py Wed May 15 18:50:26 2024 +0200
@@ -33,15 +33,22 @@
import controls.CustomIntCtrl
+wxApp = None
+
class TestCustomIntCtrl(unittest.TestCase):
def setUp(self):
- self.app = wx.App()
+ global wxApp
+ if wxApp is None:
+ wxApp = wx.App()
self.frame = wx.Frame(None)
def tearDown(self):
+ global wxApp
self.frame.Destroy()
- wx.CallAfter(wx.Exit)
- self.app.MainLoop()
+ if wxApp is not None:
+ wx.CallAfter(wx.Exit)
+ wxApp.MainLoop()
+ wxApp = None
def testMaxLimit(self):
"""Test working upper bound"""