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
+1 -3
View File
@@ -47,13 +47,11 @@ 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
if study.n_pruned_trials() > 0 {
assert!(summary.contains("complete")); assert!(summary.contains("complete"));
assert!(summary.contains("pruned")); assert!(summary.contains("pruned"));
} }
}
#[test] #[test]
fn test_display_matches_summary() { fn test_display_matches_summary() {