#NEWLINE# def test_timeout_timeout_occurs_1( self ) : #NEWLINE# #INDENT# scheduler = TestScheduler ( ) #NEWLINE# xs = scheduler . create_hot_observable ( on_next ( 70 , 1 ) , on_next ( 130 , 2 ) , on_next ( 310 , 3 ) , on_next ( 400 , 4 ) , on_completed ( 500 ) ) #NEWLINE# ys = scheduler . create_cold_observable ( on_next ( 50 , ( - 1 ) ) , on_next ( 200 , ( - 2 ) ) , on_next ( 310 , ( - 3 ) ) , on_completed ( 320 ) ) #NEWLINE# def create( ) : #NEWLINE# #INDENT# return xs . timeout ( 100 , ys , scheduler = scheduler ) #NEWLINE# #UNINDENT# results = scheduler . start ( create ) #NEWLINE# results . messages . assert_equal ( on_next ( 350 , ( - 1 ) ) , on_next ( 500 , ( - 2 ) ) , on_next ( 610 , ( - 3 ) ) , on_completed ( 620 ) ) #NEWLINE# xs . subscriptions . assert_equal ( subscribe ( 200 , 300 ) ) #NEWLINE# ys . subscriptions . assert_equal ( subscribe ( 300 , 620 ) )