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/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()
        queue.put('foo')
        self.assertEqual(queue.get(), 'foo')
        queue.put(['foo'])
        self.assertEqual(queue.get(), ['foo'])
            queue.put(10+i)
        for i in range(10):
            self.assertEqual(queue.get(), 10+i)
 
    def test_prio(self):
            queue.put(i * 'x')
        for i in range(10):
            self.assertEqual(queue.get(), (10-i-1) * 'x')
 
    def test_len(self):

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()
        queue.put('foo')
        self.assertEqual(queue.get(), 'foo')
        queue.put(['foo'])
        self.assertEqual(queue.get(), ['foo'])
            queue.put(10+i)
        for i in range(10):
            self.assertEqual(queue.get(), 10+i)
 
    def test_prio(self):
            queue.put(i * 'x')
        for i in range(10):
            self.assertEqual(queue.get(), (10-i-1) * 'x')
 
    def test_len(self):