#NEWLINE# def test_sort_index_inplace( self ) : #NEWLINE# #INDENT# rindex = list ( self . ts . index ) #NEWLINE# random . shuffle ( rindex ) #NEWLINE# random_order = self . ts . reindex ( rindex ) #NEWLINE# result = random_order . sort_index ( ascending = False , inplace = True ) #NEWLINE# self . assertIs ( result , None , msg = 'sort_index() inplace should return None' ) #NEWLINE# assert_series_equal ( random_order , self . ts . reindex ( self . ts . index [ : : ( - 1 ) ] ) ) #NEWLINE# random_order = self . ts . reindex ( rindex ) #NEWLINE# result = random_order . sort_index ( ascending = True , inplace = True ) #NEWLINE# self . assertIs ( result , None , msg = 'sort_index() inplace should return None' ) #NEWLINE# assert_series_equal ( random_order , self . ts )