#NEWLINE# def test_recv_callback_recoverable_error( self ) : #NEWLINE# #INDENT# self . mock . sock = Mock ( spec = socket . SocketType ) #NEWLINE# for error in ( errno . EWOULDBLOCK , errno . EINTR ) : #NEWLINE# #INDENT# self . mock . sock . recv . side_effect = socket . error ( error , '' ) #NEWLINE# self . assertTrue ( network . Connection . recv_callback ( self . mock , sentinel . fd , GObject . IO_IN ) ) #NEWLINE# self . assertEqual ( 0 , self . mock . stop . call_count )