def test_closeLogError(self):
        class ConnectionCloseRaise(object):
            def close(self):
                raise RuntimeError("problem!")

        pool = DummyConnectionPool()
        pool._close(ConnectionCloseRaise())

        errors = self.flushLoggedErrors(RuntimeError)
        self.assertEquals(len(errors), 1)
        self.assertEquals(errors[0].value.args[0], "problem!")
L{ConnectionPool._close} logs exceptions.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_adbapi.py/ConnectionPoolTestCase.test_closeLogError