#NEWLINE# def test_pool_removes_closed_socket( self ) : #NEWLINE# #INDENT# cx_pool = self . create_pool ( ) #NEWLINE# with cx_pool . get_socket ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) as sock_info : #NEWLINE# #INDENT# sock_info . close ( ) #NEWLINE# #UNINDENT# self . assertEqual ( 0 , len ( cx_pool . sockets ) )