#NEWLINE# def test_for_basic( self ) : #NEWLINE# #INDENT# scheduler = TestScheduler ( ) #NEWLINE# def create( ) : #NEWLINE# #INDENT# def selector( x ) : #NEWLINE# #INDENT# return scheduler . create_cold_observable ( on_next ( ( ( x * 100 ) + 10 ) , ( ( x * 10 ) + 1 ) ) , on_next ( ( ( x * 100 ) + 20 ) , ( ( x * 10 ) + 2 ) ) , on_next ( ( ( x * 100 ) + 30 ) , ( ( x * 10 ) + 3 ) ) , on_completed ( ( ( x * 100 ) + 40 ) ) ) #NEWLINE# #UNINDENT# return Observable . for_in ( [ 1 , 2 , 3 ] , selector ) #NEWLINE# #UNINDENT# results = scheduler . start ( create = scheduler ) #NEWLINE# results . messages . assert_equal ( on_next ( 310 , 11 ) , on_next ( 320 , 12 ) , on_next ( 330 , 13 ) , on_next ( 550 , 21 ) , on_next ( 560 , 22 ) , on_next ( 570 , 23 ) , on_next ( 890 , 31 ) , on_next ( 900 , 32 ) , on_next ( 910 , 33 ) , on_completed ( 920 ) )