Provide intermediate feedback during property test runs.
Avoid the interface to hang for several seconds without feedback when counterexamples are being simplified. This sends a heads-up to the user to indicate that a research of a counter example is going on.
This commit is contained in:
@@ -168,7 +168,7 @@ impl EventListener for Terminal {
|
||||
}
|
||||
Event::RunningTests => {
|
||||
eprintln!(
|
||||
"{} {}\n",
|
||||
"{} {}",
|
||||
" Testing"
|
||||
.if_supports_color(Stderr, |s| s.bold())
|
||||
.if_supports_color(Stderr, |s| s.purple()),
|
||||
@@ -205,7 +205,7 @@ impl EventListener for Terminal {
|
||||
|
||||
let summary = format!("{}{}", seed_info, fmt_test_summary(results, true));
|
||||
println!(
|
||||
"{}\n",
|
||||
"\n{}",
|
||||
pretty::indent(
|
||||
&pretty::open_box(&title, &tests, &summary, |border| border
|
||||
.if_supports_color(Stderr, |s| s.bright_black())
|
||||
@@ -214,6 +214,10 @@ impl EventListener for Terminal {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if !tests.is_empty() {
|
||||
println!();
|
||||
}
|
||||
}
|
||||
Event::ResolvingPackages { name } => {
|
||||
eprintln!(
|
||||
|
||||
Reference in New Issue
Block a user