#NEWLINE# def test_get_extended_cost_matrix_multiple_resource_wrong_ratio( self ) : #NEWLINE# #INDENT# setting = [ 'foo=0.0001' , 'bar = 2.0t' ] #NEWLINE# self . flags ( weight_setting = setting , group = 'metrics' ) #NEWLINE# ( fake_hosts , fake_filter_properties ) = self . _get_fake_cost_inputs ( ) #NEWLINE# fake_hosts = fake_hosts [ 0 : 4 ] #NEWLINE# fake_cost = self . cost_classes [ 0 ] ( ) #NEWLINE# expected_x_cost_mat = [ [ ( - 0.0625 ) , ( - 0.0625 ) , ( - 0.0625 ) , ( - 0.0625 ) ] , [ ( - 0.125 ) , ( - 0.125 ) , ( - 0.125 ) , ( - 0.125 ) ] , [ ( - 0.375 ) , ( - 0.375 ) , ( - 0.375 ) , ( - 0.375 ) ] , [ ( - 1.0 ) , ( - 1.0 ) , ( - 1.0 ) , ( - 1.0 ) ] ] #NEWLINE# x_cost_mat = fake_cost . get_extended_cost_matrix ( fake_hosts , fake_filter_properties ) #NEWLINE# expected_x_cost_mat = [ [ round ( val , 4 ) for val in row ] for row in expected_x_cost_mat ] #NEWLINE# x_cost_mat = [ [ round ( val , 4 ) for val in row ] for row in x_cost_mat ] #NEWLINE# self . assertEqual ( expected_x_cost_mat , x_cost_mat )