#NEWLINE# def test_get_plot_point_colors_categorical_column( self ) : #NEWLINE# #INDENT# exp_colors = [ [ 0.0 , 0.0 , 0.5 , 1.0 ] , [ 0.0 , 0.0 , 0.5 , 1.0 ] , [ 0.5 , 0.0 , 0.0 , 1.0 ] ] #NEWLINE# exp_color_dict = { #NEWLINE# #INDENT# 'foo' : [ 0.5 , 0.0 , 0.0 , 1.0 ] , #NEWLINE# 22 : [ 0.0 , 0.0 , 0.5 , 1.0 ] , #NEWLINE# #UNINDENT# } #NEWLINE# obs = self . min_ord_results . _get_plot_point_colors ( self . df , 'categorical' , [ 'B' , 'C' , 'A' ] , 'jet' ) #NEWLINE# npt . assert_almost_equal ( obs [ 0 ] , exp_colors ) #NEWLINE# npt . assert_equal ( obs [ 1 ] , exp_color_dict ) #NEWLINE# exp_colors = [ [ 0.0 , 0.0 , 0.5 , 1.0 ] , [ 0.5 , 0.0 , 0.0 , 1.0 ] , [ 0.5 , 0.0 , 0.0 , 1.0 ] , [ 0.0 , 0.0 , 0.5 , 1.0 ] ] #NEWLINE# obs = self . min_ord_results . _get_plot_point_colors ( exp_color_dict . df , 'categorical' , [ 'B' , 'A' , 'D' , 'C' ] , 'jet' ) #NEWLINE# npt . assert_almost_equal ( obs [ 0 ] , exp_colors ) #NEWLINE# npt . assert_equal ( obs [ 1 ] , exp_color_dict )