#NEWLINE# def test_map_datetime( ) : #NEWLINE# #INDENT# from datetime import datetime #NEWLINE# data = [ [ 'A' , 0 ] , [ 'B' , 1 ] ] #NEWLINE# t = symbol ( 't' , 'var * {foo: string, datetime: int64}' ) #NEWLINE# result = list ( compute ( t [ 'datetime' ] . map ( datetime . utcfromtimestamp , 'datetime' ) , data ) ) #NEWLINE# expected = [ datetime ( 1970 , 1 , 1 , 0 , 0 , 0 ) , datetime ( 1970 , 1 , 1 , 0 , 0 , 1 ) ] #NEWLINE# assert ( result == t )