def on_done(self, canceled): if canceled: res = [] else: self._wait_for_pending_search_complete() res = self.get_selected_items() # If nothing was matched on the final search, leave the UI up. if len(res) == 0: return if self._print_results_cb: self._print_results_cb(res, canceled) message_loop.quit_main_loop() # end of the line, no further output will happen
def async_teardown_and_stop_test(self, result, tearDown=True): try: if len(result.failures) == self._num_failures_at_start and len(result.errors) == self._num_errors_at_start: result.addSuccess(self) if tearDown: try: self.tearDown() except KeyboardInterrupt: raise except: result.addError(self, sys.exc_info()) ok = False if ok: result.addSuccess(self) finally: result.stopTest(self) message_loop.quit_main_loop()
def async_teardown_and_stop_test(self, result, tearDown=True): try: if len(result.failures) == self._num_failures_at_start and len( result.errors) == self._num_errors_at_start: result.addSuccess(self) if tearDown: try: self.tearDown() except KeyboardInterrupt: raise except: result.addError(self, sys.exc_info()) ok = False if ok: result.addSuccess(self) finally: result.stopTest(self) message_loop.quit_main_loop()
def on_done(self, canceled): self._settings.filter_text = self._filter_text.encode('utf8') if canceled: res = [] else: res = self.get_selected_items() if self._options.ok and not canceled: print "OK" if self._options.results_file: ofile = open(self._options.results_file, 'w') else: ofile = sys.stdout if self._options.lisp_results: ofile.write("(%s)\n" % (" ".join(['"%s"' % x for x in res]))) else: ofile.write("\n".join(res)) ofile.write("\n") if self._options.results_file: ofile.close() message_loop.quit_main_loop() # end of the line, no further output will happen
def step2(): message_loop.quit_main_loop()
def step2(): self.assertTrue(message_loop.is_main_loop_running()) message_loop.quit_main_loop()
def go(): self.assertEquals(True, True) message_loop.quit_main_loop()