#NEWLINE# def test_exec_error_in_response( self , r ) : #NEWLINE# #INDENT# '\n        an invalid pipeline command at exec time adds the exception instance\n        to the list of returned values\n        ' #NEWLINE# r [ 'c' ] = 'a' #NEWLINE# with r . pipeline ( ) as pipe : #NEWLINE# #INDENT# pipe . set ( 'a' , 1 ) . set ( 'b' , 2 ) . lpush ( 'c' , 3 ) . set ( 'd' , 4 ) #NEWLINE# result = pipe . execute ( raise_on_error = False ) #NEWLINE# assert result [ 0 ] #NEWLINE# assert ( r [ 'a' ] == b ( '1' ) ) #NEWLINE# assert result [ 1 ] #NEWLINE# assert ( r [ 'b' ] == b ( '2' ) ) #NEWLINE# assert isinstance ( result [ 2 ] , redis . ResponseError ) #NEWLINE# assert ( r [ 'c' ] == b ( 'a' ) ) #NEWLINE# assert result [ 3 ] #NEWLINE# assert ( r [ 'd' ] == b ( '4' ) ) #NEWLINE# assert ( pipe . set ( 'z' , 'zzz' ) . execute ( ) == [ True ] ) #NEWLINE# assert ( r [ 'z' ] == b ( 'zzz' ) )