#NEWLINE# def test_timeout_duration_simple_first_throws( self ) : #NEWLINE# #INDENT# ex = 'ex' #NEWLINE# scheduler = TestScheduler ( ) #NEWLINE# xs = scheduler . create_hot_observable ( on_next ( 310 , 1 ) , on_next ( 350 , 2 ) , on_next ( 420 , 3 ) , on_completed ( 450 ) ) #NEWLINE# ys = scheduler . create_cold_observable ( on_error ( 50 , ex ) ) #NEWLINE# zs = scheduler . create_cold_observable ( ) #NEWLINE# def create( ) : #NEWLINE# #INDENT# return xs . timeout_with_selector ( ys , ( lambda _ : zs ) ) #NEWLINE# #UNINDENT# results = scheduler . start ( create ) #NEWLINE# results . messages . assert_equal ( on_error ( 250 , ex ) ) #NEWLINE# xs . subscriptions . assert_equal ( subscribe ( 200 , 250 ) ) #NEWLINE# ys . subscriptions . assert_equal ( subscribe ( 200 , 250 ) ) #NEWLINE# zs . subscriptions . assert_equal ( )