tests.utils.printing

Printing utilities for testing

Functions

tests.utils.printing.high_prec_float_str(x)

Convert a float to a string with high precision

Parameters:

x (float)

Return type:

str

tests.utils.printing.pairs_to_rows(actual, desired, close, fmt=DEFAULT_FMT)

Convert pairs of actual and desired values to string rows with color

Parameters:
Return type:

List[str]

tests.utils.printing.print_1d(actual, desired, close)

Print a 1D array

Parameters:
tests.utils.printing.print_1d_large(actual, desired, close, fmt=DEFAULT_FMT)

Print a large 1D array

Parameters:
tests.utils.printing.print_1d_small(actual, desired, close, fmt=DEFAULT_FMT)

Print a small 1D array

Parameters:
tests.utils.printing.print_2d(arr, close, fmt=DEFAULT_FMT)

Print a 2D array

Parameters:
tests.utils.printing.print_full_prec(x)

Print a float with full precision

Parameters:

x (float)

tests.utils.printing.print_high_prec(x)

Print a value or an array with high precision

Parameters:

x (float | ndarray)

tests.utils.printing.row_to_str(row, close, fmt=DEFAULT_FMT)

Convert an array row to string with color

Parameters:
Return type:

str