#NEWLINE# def test_when_throw_non_empty( self ) : #NEWLINE# #INDENT# ex = 'ex' #NEWLINE# scheduler = TestScheduler ( ) #NEWLINE# xs = scheduler . create_hot_observable ( on_error ( 240 , ex ) ) #NEWLINE# ys = scheduler . create_hot_observable ( on_completed ( 270 ) ) #NEWLINE# def create( ) : #NEWLINE# #INDENT# def selector( x , y ) : #NEWLINE# #INDENT# return ( x + y ) #NEWLINE# #UNINDENT# return Observable . when ( xs . and_ ( ys ) . then_do ( selector ) ) #NEWLINE# #UNINDENT# results = scheduler . start ( create ) #NEWLINE# results . messages . assert_equal ( on_error ( 240 , ex ) )