#NEWLINE# def test_ops_datetimelike_align( self ) : #NEWLINE# #INDENT# dt = Series ( date_range ( '2012-1-1' , periods = 3 , freq = 'D' ) ) #NEWLINE# dt . iloc [ 2 ] = np . nan #NEWLINE# dt2 = dt [ : : ( - 1 ) ] #NEWLINE# expected = Series ( [ timedelta ( 0 ) , timedelta ( 0 ) , pd . NaT ] ) #NEWLINE# result = ( dt2 - dt ) #NEWLINE# assert_series_equal ( result , expected ) #NEWLINE# expected = Series ( expected , name = 0 ) #NEWLINE# result = ( dt2 . to_frame ( ) - dt . to_frame ( ) ) [ 0 ] #NEWLINE# assert_series_equal ( result , expected )