def test_display_hypothesis_output(capsys): # When Hypothesis output is displayed default.display_hypothesis_output(["foo", "bar"]) lines = capsys.readouterr().out.split("\n") # Then the relevant section title is displayed assert " HYPOTHESIS OUTPUT" in lines[0] # And the output is displayed as separate lines in red color assert " ".join(lines[1:3]) == strip_style_win32(click.style("foo bar", fg="red"))
def handle_finished( context: ExecutionContext, event: events.Finished, warnings: FrozenSet[str], statistics: bool = False, ) -> None: """Show the outcome of the whole testing session.""" click.echo() default.display_hypothesis_output(context.hypothesis_output) display_exceptions(context, event) display_warnings(context, event, warnings) display_errors(context, event, warnings) default.display_application_logs(context, event) display_totals(context, event, warnings) click.echo() display_summary(event, warnings, statistics)