#NEWLINE# def test_single_async_predicate_throw( self ) : #NEWLINE# #INDENT# ex = 'ex' #NEWLINE# scheduler = TestScheduler ( ) #NEWLINE# xs = scheduler . create_hot_observable ( on_next ( 150 , 1 ) , on_error ( 210 , ex ) ) #NEWLINE# def create( ) : #NEWLINE# #INDENT# def predicate( x ) : #NEWLINE# #INDENT# return ( x > 10 ) #NEWLINE# #UNINDENT# return xs . single ( predicate ) #NEWLINE# #UNINDENT# res = scheduler . start ( create = create ) #NEWLINE# res . messages . assert_equal ( on_error ( 210 , ex ) ) #NEWLINE# xs . subscriptions . assert_equal ( subscribe ( 200 , 210 ) )