def run(self):
    for i in range(self._delay):
        print('thread running...')
time.sleep(1)
if self._want_abort:
    self.work_done(None)
return
self.work_done('My result')

def work_done(self, result):
    pass
How to have wxpython capture thread events in a unit test?