Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(22)  |  Call(22)  |  Derive(0)  |  Import(0)

src/b/l/bluepass-HEAD/bluepass/syncapi.py   bluepass(Download)
    def __init__(self, server):
        super(SyncAPIPublisher, self).__init__(target=self._run)
        self.server = server
        self.queue = gruvi.Queue()
        self.published_nodes = set()

src/b/l/bluepass-HEAD/bluepass/syncer.py   bluepass(Download)
    def __init__(self):
        """Constructor."""
        super(Syncer, self).__init__(target=self._run)
        self._log = logging.get_logger(self)
        self.queue = gruvi.Queue()

src/g/r/gruvi-0.9.2/tests/test_sync.py   gruvi(Download)
    def test_basic(self):
        # What is put in the queue, should come out.
        queue = gruvi.Queue()
        queue.put(10)
        self.assertEqual(queue.get(), 10)
 
    def test_types(self):
        # Queue should support putting in arbitrary objects.
        queue = gruvi.Queue()
    def test_fifo(self):
        # The default behavior of a queue should be FIFO
        queue = gruvi.Queue()
        for i in range(10):
            queue.put(10+i)
    def test_prio(self):
        # The constructor should take a priofunc argument which is a function
        # that returns the priority of an item. When getting elements from the
        # queue, the element with the highest priority should be returned first.
        queue = gruvi.Queue(priofunc=lambda el: len(el))
    def test_len(self):
        # The len() of a queue should reflect the number of elements
        queue = gruvi.Queue()
        for i in range(10):
            queue.put(10+i)

src/g/r/gruvi-HEAD/tests/test_sync.py   gruvi(Download)
    def test_basic(self):
        # What is put in the queue, should come out.
        queue = gruvi.Queue()
        queue.put(10)
        self.assertEqual(queue.get(), 10)
 
    def test_types(self):
        # Queue should support putting in arbitrary objects.
        queue = gruvi.Queue()
    def test_fifo(self):
        # The default behavior of a queue should be FIFO
        queue = gruvi.Queue()
        for i in range(10):
            queue.put(10+i)
    def test_prio(self):
        # The constructor should take a priofunc argument which is a function
        # that returns the priority of an item. When getting elements from the
        # queue, the element with the highest priority should be returned first.
        queue = gruvi.Queue(priofunc=lambda el: len(el))
    def test_len(self):
        # The len() of a queue should reflect the number of elements
        queue = gruvi.Queue()
        for i in range(10):
            queue.put(10+i)