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.
This commit is contained in:
Manuel Raimann
2026-02-12 14:44:19 +01:00
parent 271748700f
commit 750bbad0d8
+3 -5
View File
@@ -47,12 +47,10 @@ fn test_summary_with_pruned_trials() {
study.prune_trial(trial); study.prune_trial(trial);
} }
assert_eq!(study.n_pruned_trials(), 2);
let summary = study.summary(); let summary = study.summary();
// Should show breakdown when there are pruned trials assert!(summary.contains("complete"));
if study.n_pruned_trials() > 0 { assert!(summary.contains("pruned"));
assert!(summary.contains("complete"));
assert!(summary.contains("pruned"));
}
} }
#[test] #[test]