#NEWLINE# def test_take_twice2( self ) : #NEWLINE# #INDENT# scheduler = TestScheduler ( ) #NEWLINE# xs = scheduler . create_hot_observable ( on_next ( 210 , 1 ) , on_next ( 220 , 2 ) , on_next ( 230 , 3 ) , on_next ( 240 , 4 ) , on_next ( 250 , 5 ) , on_next ( 260 , 6 ) , on_completed ( 270 ) ) #NEWLINE# def create( ) : #NEWLINE# #INDENT# return xs . take_with_time ( 35 , scheduler ) . take_with_time ( 55 , scheduler ) #NEWLINE# #UNINDENT# res = scheduler . start ( res ) #NEWLINE# res . messages . assert_equal ( on_next ( 210 , 1 ) , on_next ( 220 , 2 ) , on_next ( 230 , 3 ) , on_completed ( 235 ) ) #NEWLINE# xs . subscriptions . assert_equal ( subscribe ( 200 , 235 ) )