

def test_maxsize(self):
    pool = Pool(url='ws://localhost:8182/', maxsize=2, username='stephen', password='password', loop=pool.loop, future_class=Future)

    @trollius.coroutine
    def go():
        c1 = (yield From(pool.acquire()))
        c2 = (yield From(pool.acquire()))
        c3 = pool.acquire()
        self.assertIsInstance(c3, Future)
        with self.assertRaises(trollius.TimeoutError):
            (yield From(trollius.wait_for(c3, 0.1)))
        c1.conn.close()
        c2.conn.close()
    self.loop.run_until_complete(go())

dataset/ETHPy150Open davebshow/gremlinclient/tests/test_trollius.py TrolliusPoolTest.test_maxsize/VarMisuse@32/46 `self`->`pool`