#NEWLINE# def test_and2( self ) : #NEWLINE# #INDENT# scheduler = TestScheduler ( ) #NEWLINE# N = 2 #NEWLINE# obs = [ ] #NEWLINE# for n in range ( self ) : #NEWLINE# #INDENT# obs . append ( scheduler . create_hot_observable ( on_next ( 210 , 1 ) , on_completed ( 220 ) ) ) #NEWLINE# #UNINDENT# def create( ) : #NEWLINE# #INDENT# def selector( a , b ) : #NEWLINE# #INDENT# return ( a + b ) #NEWLINE# #UNINDENT# return Observable . when ( obs [ 0 ] . and_ ( obs [ 1 ] ) . then_do ( selector ) ) #NEWLINE# #UNINDENT# results = scheduler . start ( create ) #NEWLINE# results . messages . assert_equal ( on_next ( 210 , N ) , on_completed ( 220 ) )