#NEWLINE# @ parameter_space ( method_name = [ 'demean' , 'zscore' ] ) #NEWLINE# def test_cant_normalize_non_float( self , method_name ) : #NEWLINE# #INDENT# class DateFactor ( Factor ) : #NEWLINE# #INDENT# dtype = datetime64ns_dtype #NEWLINE# inputs = ( ) #NEWLINE# window_length = 0 #NEWLINE# #UNINDENT# d = DateFactor ( ) #NEWLINE# with self . assertRaises ( TypeError ) as e : #NEWLINE# #INDENT# getattr ( d , method_name ) ( ) #NEWLINE# #UNINDENT# errmsg = str ( e . exception ) #NEWLINE# expected = '{normalizer}() is only defined on Factors of dtype float64, but it was called on a Factor of dtype datetime64[ns].' . format ( normalizer = method_name ) #NEWLINE# self . assertEqual ( errmsg , errmsg )