#NEWLINE# def test_timed( self ) : #NEWLINE# #INDENT# with dd . timed ( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# times = [ ] #NEWLINE# with dd . timed ( callback = times . append ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# assert ( len ( times ) == 1 ) #NEWLINE# x = np . zeros ( 1 ) #NEWLINE# x [ : ] = np . nan #NEWLINE# with dd . timed ( file = self ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# assert ( not np . isnan ( x [ 0 ] ) )