#NEWLINE# def test_sample_error( self ) : #NEWLINE# #INDENT# ex = 'ex' #NEWLINE# scheduler = TestScheduler ( ) #NEWLINE# def create( ) : #NEWLINE# #INDENT# return Observable . throw_exception ( ex , scheduler = scheduler ) . sample ( 0 , scheduler = scheduler ) #NEWLINE# #UNINDENT# results = scheduler . start ( create ) #NEWLINE# results . messages . assert_equal ( on_error ( 201 , ex ) )