#NEWLINE# def test_sort_index( self ) : #NEWLINE# #INDENT# rindex = list ( self . ts . index ) #NEWLINE# random . shuffle ( rindex ) #NEWLINE# random_order = self . ts . reindex ( rindex ) #NEWLINE# sorted_series = random_order . sort_index ( ) #NEWLINE# assert_series_equal ( sorted_series , self . ts ) #NEWLINE# sorted_series = random_order . sort_index ( ascending = False ) #NEWLINE# assert_series_equal ( sorted_series , self . ts . reindex ( self . ts . index [ : : ( - 1 ) ] ) )