mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-08-23 11:00:08 +02:00
Merge pull request #64 from swt2c/fix_process_tests
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):
|
||||
flag = False
|
||||
self.flag = False
|
||||
def onEndProcess(evt):
|
||||
flag = True
|
||||
self.flag = True
|
||||
|
||||
if 'wxMac' not in wx.PlatformInfo:
|
||||
p = wx.Process(self.frame)
|
||||
self.frame.Bind(wx.EVT_END_PROCESS, onEndProcess)
|
||||
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
|
||||
# reading from the process
|
||||
|
Reference in New Issue
Block a user