示例#1
0
def wait_build(result_queue, timeout=5):
    """
    Uses the result queue to wait for a result from the open_file() callback

    :param result_queue:
        The Queue() to get the result from

    :param timeout:
        How long to wait before considering the test a failure

    :return:
        The value from the queue
    """
    def _send_result(package_name, event_name, payload):
        result_queue.put(payload.result)

    try:
        package_events.listen('Golang Build', _send_result)
        return result_queue.get(timeout=timeout)
    finally:
        package_events.unlisten('Golang Build', _send_result)
示例#2
0
def wait_build(result_queue, timeout=5):
    """
    Uses the result queue to wait for a result from the open_file() callback

    :param result_queue:
        The Queue() to get the result from

    :param timeout:
        How long to wait before considering the test a failure

    :return:
        The value from the queue
    """

    def _send_result(package_name, event_name, payload):
        result_queue.put(payload.result)

    try:
        package_events.listen('Golang Build', _send_result)
        return result_queue.get(timeout=timeout)
    finally:
        package_events.unlisten('Golang Build', _send_result)
示例#3
0
 def __init__(self):
     self.observer = Observer()
     self.event_handler = ReportEvent()
     self.paths = {}
     self.observer.start()
     package_events.listen(u'FileBrowser', self.dired_event_handler)
示例#4
0
 def __init__(self):
     self.paths = {}
     self.ignore_views = set()
     self.scheduled_views = {}
     package_events.listen(u'FileBrowserWFS', self.update_paths)
 def __init__(self):
     self.observer = Observer()
     self.event_handler = ReportEvent()
     self.paths = {}
     self.observer.start()
     package_events.listen(u'FileBrowser', self.dired_event_handler)
 def __init__(self):
     self.paths = {}
     self.ignore_views = set()
     self.scheduled_views = {}
     package_events.listen(u'FileBrowserWFS', self.update_paths)