#NEWLINE# def test_and4_error( self ) : #NEWLINE# #INDENT# ex = 'ex' #NEWLINE# N = 4 #NEWLINE# for i in range ( N ) : #NEWLINE# #INDENT# scheduler = TestScheduler ( ) #NEWLINE# obs = [ ] #NEWLINE# for j in range ( N ) : #NEWLINE# #INDENT# if ( j == i ) : #NEWLINE# #INDENT# obs . append ( scheduler . create_hot_observable ( on_error ( 210 , ex ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# obs . append ( scheduler . create_hot_observable ( on_next ( 210 , 1 ) , on_completed ( 220 ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# def create( ) : #NEWLINE# #INDENT# def selector( a , b , c , d ) : #NEWLINE# #INDENT# return ( ( ( a + b ) + c ) + d ) #NEWLINE# #UNINDENT# return Observable . when ( obs [ 0 ] . and_ ( obs [ 1 ] ) . and_ ( obs [ 2 ] ) . and_ ( obs [ 3 ] ) . then_do ( selector ) ) #NEWLINE# #UNINDENT# results = scheduler . start ( create ) #NEWLINE# results . messages . assert_equal ( on_error ( 210 , ex ) )