

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

    @trollius.coroutine
    def go():
        self.assertEqual(len(pool.pool), 0)
        c1 = (yield From(pool.acquire()))
        self.assertEqual(len(pool._acquired), 1)
        (yield From(pool.release(c1)))
        self.assertEqual(len(pool.pool), 1)
        self.assertEqual(len(pool._acquired), 0)
    self.loop.run_until_complete(go())

dataset/ETHPy150Open davebshow/gremlinclient/tests/test_trollius.py TrolliusPoolTest.test_release/original