#NEWLINE# def sanity_test( self ) : #NEWLINE# #INDENT# 'HoltWinters should throw an Exception if applied to a Time Series shorter than the season length' #NEWLINE# hwm = HoltWintersMethod ( seasonLength = 2 ) #NEWLINE# data = [ [ 0.0 , 152 ] ] #NEWLINE# tsSrc = TimeSeries . from_twodim_list ( data ) #NEWLINE# try : #NEWLINE# #INDENT# tsSrc . apply ( hwm ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert False , 'HoltWinters should throw an Exception if applied to a Time Series shorter than the season length'