(
    test_result: TestResult,
    test_index: int,
    num_tests: int,
    progress_styles: List[TestProgressStyle],
    extra_left_pad: int = 0,
)
return grid
Outputs a single test result to the terminal in Ward's standard output
    format which outputs a single test per line.
Outputs a single test result to the terminal in Ward's standard output
    format which outputs a single test per line.
Outputs a single test result to the terminal in Ward s standard output format which outputs a single test per line .
def get_test_result_line(
    test_result: TestResult,
    test_index: int,
    num_tests: int,
    progress_styles: List[TestProgressStyle],
    extra_left_pad: int = 0,
) -> Table:
    """
    Outputs a single test result to the terminal in Ward's standard output
    format which outputs a single test per line.
    """
    outcome_tag = test_result.outcome.name[:4]

    test = test_result.test
    test_location = format_test_location(test)
    test_case_number = format_test_case_number(test)
    test_style = outcome_to_style(test_result.outcome)

    grid = Table.grid(expand=True)
    grid.add_column()
    grid.add_column()
    grid.add_column()
    columns: List[RenderableType] = [
        Padding(outcome_tag, style=test_style, pad=(0, 1, 0, 1 + extra_left_pad)),
        Padding(f"{test_location}{test_case_number}", style="muted", pad=(0, 1, 0, 1)),
        Padding(
            Markdown(test.description, inline_code_theme="ansi_dark"), pad=(0, 1, 0, 0)
        ),
    ]

    # Skip/Xfail tests may have a reason note attached that we'll print
    reason = getattr(test.marker, "reason", "")
    if reason:
        assert test.marker is not None, "if reason exists, marker must too"
        if test.marker.active:
            grid.add_column(justify="center", style=test_style)
            columns.append(Padding(reason, pad=(0, 1, 0, 1)))

    if TestProgressStyle.INLINE in progress_styles:
        grid.add_column(justify="right", style="muted")
        columns.append(f"{(test_index + 1) / num_tests:>4.0%}")

    grid.add_row(*columns)

    return grid
def get_test_result_line ( test_result : TestResult , test_index : int , num_tests : int , progress_styles : List [ TestProgressStyle ] , extra_left_pad : int = 0 , ) -> Table : outcome_tag = test_result . outcome . name [ : 4 ] test = test_result . test test_location = format_test_location ( test ) test_case_number = format_test_case_number ( test ) test_style = outcome_to_style ( test_result . outcome ) grid = Table . grid ( expand = True ) grid . add_column ( ) grid . add_column ( ) grid . add_column ( ) columns : List [ RenderableType ] = [ Padding ( outcome_tag , style = test_style , pad = ( 0 , 1 , 0 , 1 + extra_left_pad ) ) , Padding ( f"{test_location}{test_case_number}" , style = "muted" , pad = ( 0 , 1 , 0 , 1 ) ) , Padding ( Markdown ( test . description , inline_code_theme = "ansi_dark" ) , pad = ( 0 , 1 , 0 , 0 ) ) , ] # Skip/Xfail tests may have a reason note attached that we'll print reason = getattr ( test . marker , "reason" , "" ) if reason : assert test . marker is not None , "if reason exists, marker must too" if test . marker . active : grid . add_column ( justify = "center" , style = test_style ) columns . append ( Padding ( reason , pad = ( 0 , 1 , 0 , 1 ) ) ) if TestProgressStyle . INLINE in progress_styles : grid . add_column ( justify = "right" , style = "muted" ) columns . append ( f"{(test_index + 1) / num_tests:>4.0%}" ) grid . add_row ( * columns ) return grid