From 750bbad0d8a7dbfa9343c3f3646827b2a1f99a5b Mon Sep 17 00:00:00 2001 From: Manuel Raimann Date: Thu, 12 Feb 2026 14:19:07 +0100 Subject: [PATCH] test: assert pruned count unconditionally in summary test Remove the conditional guard on pruned trial assertions since the test explicitly prunes 2 trials. Assert the expected count first, then check summary content unconditionally to catch regressions. --- tests/study/summary.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/study/summary.rs b/tests/study/summary.rs index f868f0d..2195e38 100644 --- a/tests/study/summary.rs +++ b/tests/study/summary.rs @@ -47,12 +47,10 @@ fn test_summary_with_pruned_trials() { study.prune_trial(trial); } + assert_eq!(study.n_pruned_trials(), 2); let summary = study.summary(); - // Should show breakdown when there are pruned trials - if study.n_pruned_trials() > 0 { - assert!(summary.contains("complete")); - assert!(summary.contains("pruned")); - } + assert!(summary.contains("complete")); + assert!(summary.contains("pruned")); } #[test]