'L{ConnectionPool._close} logs exceptions.'

def test_closeLogError(self):

    class ConnectionCloseRaise(object, ):
        def close(self):
            raise RuntimeError('problem!')
    pool = DummyConnectionPool()
    pool._close(ConnectionCloseRaise())
    errors = self.flushLoggedErrors(RuntimeError)
    self.assertEqual(len(errors), 1)
    self.assertEqual(errors[0].value.args[0], 'problem!')
