#NEWLINE# def test_conversion( self ) : #NEWLINE# #INDENT# rs = self . dtc . convert ( [ '2012-1-1' ] , None , None ) [ 0 ] #NEWLINE# xp = datetime ( 2012 , 1 , 1 ) . toordinal ( ) #NEWLINE# self . assertEqual ( rs , xp ) #NEWLINE# rs = self . dtc . convert ( '2012-1-1' , None , None ) #NEWLINE# self . assertEqual ( rs , xp ) #NEWLINE# rs = self . dtc . convert ( date ( 2012 , 1 , 1 ) , None , None ) #NEWLINE# self . assertEqual ( rs , xp ) #NEWLINE# rs = self . dtc . convert ( datetime ( 2012 , 1 , 1 ) . toordinal ( ) , None , None ) #NEWLINE# self . assertEqual ( rs , xp ) #NEWLINE# rs = self . dtc . convert ( '2012-1-1' , None , None ) #NEWLINE# self . assertEqual ( rs , xp ) #NEWLINE# rs = self . dtc . convert ( Timestamp ( '2012-1-1' ) , None , None ) #NEWLINE# self . assertEqual ( rs , xp ) #NEWLINE# rs = self . dtc . convert ( np_datetime64_compat ( '2012-01-01' ) , None , None ) #NEWLINE# self . assertEqual ( rs , xp ) #NEWLINE# rs = self . dtc . convert ( np_datetime64_compat ( '2012-01-01 00:00:00+0000' ) , None , None ) #NEWLINE# self . assertEqual ( rs , xp ) #NEWLINE# rs = self . dtc . convert ( np . array ( [ np_datetime64_compat ( '2012-01-01 00:00:00+0000' ) , np_datetime64_compat ( '2012-01-02 00:00:00+0000' ) ] ) , None , None ) #NEWLINE# self . assertEqual ( rs [ 0 ] , xp )