#NEWLINE# def test_pool_reuses_open_socket( self ) : #NEWLINE# #INDENT# cx_pool = self . create_pool ( max_pool_size = 10 ) #NEWLINE# cx_pool . _check_interval_seconds = 0 #NEWLINE# with cx_pool . get_socket ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) as sock_info : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# with cx_pool . get_socket ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) as new_sock_info : #NEWLINE# #INDENT# self . assertEqual ( sock_info , cx_pool ) #NEWLINE# #UNINDENT# self . assertEqual ( 1 , len ( cx_pool . sockets ) )