#NEWLINE# def test_select_not_completed( self ) : #NEWLINE# #INDENT# scheduler = TestScheduler ( ) #NEWLINE# invoked = [ 0 ] #NEWLINE# xs = scheduler . create_hot_observable ( on_next ( 180 , 1 ) , on_next ( 210 , 2 ) , on_next ( 240 , 3 ) , on_next ( 290 , 4 ) , on_next ( 350 , 5 ) ) #NEWLINE# def factory( ) : #NEWLINE# #INDENT# def projection( x ) : #NEWLINE# #INDENT# invoked [ 0 ] += 1 #NEWLINE# return ( x + 1 ) #NEWLINE# #UNINDENT# return xs . map ( projection ) #NEWLINE# #UNINDENT# results = scheduler . start ( invoked ) #NEWLINE# results . messages . assert_equal ( on_next ( 210 , 3 ) , on_next ( 240 , 4 ) , on_next ( 290 , 5 ) , on_next ( 350 , 6 ) ) #NEWLINE# xs . subscriptions . assert_equal ( subscribe ( 200 , 1000 ) ) #NEWLINE# assert ( invoked [ 0 ] == 4 )