#NEWLINE# def test_exec_error_raised( self , r ) : #NEWLINE# #INDENT# 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# with pytest . raises ( redis . ResponseError ) as ex : #NEWLINE# #INDENT# pipe . execute ( ) #NEWLINE# #UNINDENT# assert unicode ( ex . value ) . startswith ( 'Command # 3 (LPUSH c 3) of pipeline caused error: ' ) #NEWLINE# assert ( pipe . set ( 'z' , 'zzz' ) . execute ( ) == [ True ] ) #NEWLINE# assert ( pipe [ 'z' ] == b ( 'zzz' ) )