from utils.evaluation import evaluate_predictions def test_evaluate_predictions(): y_true = ["Positive", "Negative", "Positive"] y_pred = ["Positive", "Negative", "Positive"] # Test perfect match report = evaluate_predictions(y_true, y_pred) assert report["accuracy"] == 1.0, "Accuracy should be 100% for perfect predictions" # Test mismatched predictions y_pred_mismatch = ["Negative", "Negative", "Positive"] report_mismatch = evaluate_predictions(y_true, y_pred_mismatch) assert report_mismatch["accuracy"] < 1.0, "Accuracy should be less than 100% for mismatched predictions"