コード例 #1
0
  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
コード例 #2
0
    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
コード例 #3
0
 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()
コード例 #4
0
    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()
コード例 #5
0
  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
コード例 #6
0
 def step2():
     message_loop.quit_main_loop()
コード例 #7
0
 def step2():
     self.assertTrue(message_loop.is_main_loop_running())
     message_loop.quit_main_loop()
コード例 #8
0
ファイル: ui_test_case_test.py プロジェクト: Dlat/quickopen
 def go():
   self.assertEquals(True, True)
   message_loop.quit_main_loop()
コード例 #9
0
 def go():
     self.assertEquals(True, True)
     message_loop.quit_main_loop()
コード例 #10
0
ファイル: message_loop_test.py プロジェクト: Dlat/quickopen
 def step2():
   message_loop.quit_main_loop()
コード例 #11
0
ファイル: message_loop_test.py プロジェクト: Dlat/quickopen
 def step2():
   self.assertTrue(message_loop.is_main_loop_running())
   message_loop.quit_main_loop()