def test_iba_error_y_score_prob():
 (y_true, y_pred, _) = make_prediction(binary=True)
 aps = make_index_balanced_accuracy(alpha=0.5, squared=True)(average_precision_score)
 assert_raises(AttributeError, aps, y_true, y_pred)
 brier = make_index_balanced_accuracy(alpha=0.5, squared=True)(brier_score_loss)
 assert_raises(AttributeError, brier, y_true, y_pred)
 kappa = make_index_balanced_accuracy(alpha=0.5, squared=True)(cohen_kappa_score)
 assert_raises(AttributeError, kappa, y_true, y_pred)
 ras = make_index_balanced_accuracy(alpha=0.5, squared=True)(roc_auc_score)
 assert_raises(AttributeError, ras, y_true, y_pred)

def test_iba_error_y_score_prob ( ) : ( y_true , y_pred , _ ) = make_prediction ( binary = True ) aps = make_index_balanced_accuracy ( alpha = 0.5 , squared = True ) ( average_precision_score ) assert_raises ( AttributeError , aps , y_true , y_pred ) brier = make_index_balanced_accuracy ( alpha = 0.5 , squared = True ) ( brier_score_loss ) assert_raises ( AttributeError , brier , y_true , y_pred ) kappa = make_index_balanced_accuracy ( alpha = 0.5 , squared = True ) ( cohen_kappa_score ) assert_raises ( AttributeError , kappa , y_true , y_pred ) ras = make_index_balanced_accuracy ( alpha = 0.5 , squared = True ) ( roc_auc_score ) assert_raises ( AttributeError , ras , y_true , y_pred )
test if an error is raised when a scoring metric take over parameters than y_pred .