mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
Fix process test - was crashing intermittently. Also, check the flag.
This commit is contained in:
@@ -18,14 +18,16 @@ class process_Tests(wtc.WidgetTestCase):
|
|||||||
|
|
||||||
|
|
||||||
def test_process2(self):
|
def test_process2(self):
|
||||||
flag = False
|
self.flag = False
|
||||||
def onEndProcess(evt):
|
def onEndProcess(evt):
|
||||||
flag = True
|
self.flag = True
|
||||||
|
|
||||||
if 'wxMac' not in wx.PlatformInfo:
|
if 'wxMac' not in wx.PlatformInfo:
|
||||||
p = wx.Process(self.frame)
|
p = wx.Process(self.frame)
|
||||||
self.frame.Bind(wx.EVT_END_PROCESS, onEndProcess)
|
self.frame.Bind(wx.EVT_END_PROCESS, onEndProcess)
|
||||||
wx.Execute('%s %s' % (sys.executable, testscript), callback=p)
|
wx.Execute('%s %s' % (sys.executable, testscript), callback=p)
|
||||||
|
self.waitFor(1000)
|
||||||
|
self.assertTrue(self.flag)
|
||||||
|
|
||||||
# TODO: When the stream classes are wrapped add tests for writing to and
|
# TODO: When the stream classes are wrapped add tests for writing to and
|
||||||
# reading from the process
|
# reading from the process
|
||||||
|
|||||||
Reference in New Issue
Block a user