#NEWLINE# def test_closeLogError( self ) : #NEWLINE# #INDENT# '\n        L{ConnectionPool._close} logs exceptions.\n        ' #NEWLINE# class ConnectionCloseRaise ( object ) : #NEWLINE# #INDENT# def close( self ) : #NEWLINE# #INDENT# raise RuntimeError ( 'problem!' ) #NEWLINE# #UNINDENT# #UNINDENT# pool = DummyConnectionPool ( ) #NEWLINE# pool . _close ( ConnectionCloseRaise ( ) ) #NEWLINE# errors = self . flushLoggedErrors ( RuntimeError ) #NEWLINE# self . assertEqual ( len ( errors ) , 1 ) #NEWLINE# self . assertEqual ( errors [ 0 ] . value . args [ 0 ] , 'problem!' )