approvaltests/combination_approvals.py
def verify_all_combinations(
    function_under_test: Callable,
    input_arguments: Sequence[Sequence[Any]],
    formatter: Optional[Callable] = None,
    reporter: Optional[ReporterForTesting] = None,
    *,  # enforce keyword arguments - https://www.python.org/dev/peps/pep-3102/
    options: Optional[Options] = None
) -> None:
    """Run func with all possible combinations of args and verify outputs against the recorded approval file.

    Args:
        function_under_test (function): function under test.
        input_arguments: list of values to test for each input argument.  For example, a function f(product, quantity)
            could be tested with the input_arguments [['water', 'cola'], [1, 4]], which would result in outputs for the
            following calls being recorded and verified: f('water', 1), f('water', 4), f('cola', 1), f('cola', 4).
        formatter (function): function for formatting the function inputs/outputs before they are recorded to an
            approval file for comparison.
        reporter (approvaltests.reporter.Reporter): an approval reporter.

    Raises:
        ApprovalException: if the results to not match the approved results.
    """
    options = initialize_options(options, reporter)
    verify_all_combinations_with_namer(
        function_under_test, input_arguments, formatter, None, options=options
    )
Run func with all possible combinations of args and verify outputs against the recorded approval file.

    Args:
        function_under_test (function): function under test.
        input_arguments: list of values to test for each input argument.  For example, a function f(product, quantity)
            could be tested with the input_arguments [['water', 'cola'], [1, 4]], which would result in outputs for the
            following calls being recorded and verified: f('water', 1), f('water', 4), f('cola', 1), f('cola', 4).
        formatter (function): function for formatting the function inputs/outputs before they are recorded to an
            approval file for comparison.
        reporter (approvaltests.reporter.Reporter): an approval reporter.

    Raises:
        ApprovalException: if the results to not match the approved results.
    
Run func with all possible combinations of args and verify outputs against the recorded approval file.
Run func with all possible combinations of args and verify outputs against the recorded approval file .
def verify_all_combinations(
    function_under_test: Callable,
    input_arguments: Sequence[Sequence[Any]],
    formatter: Optional[Callable] = None,
    reporter: Optional[ReporterForTesting] = None,
    *,  
    options: Optional[Options] = None
) -> None:
    options = initialize_options(options, reporter)
    verify_all_combinations_with_namer(
        function_under_test, input_arguments, formatter, None, options=options
    )
def verify_all_combinations ( function_under_test : Callable , input_arguments : Sequence [ Sequence [ Any ] ] , formatter : Optional [ Callable ] = None , reporter : Optional [ ReporterForTesting ] = None , * , options : Optional [ Options ] = None ) -> None : options = initialize_options ( options , reporter ) verify_all_combinations_with_namer ( function_under_test , input_arguments , formatter , None , options = options )
Run func with all possible combinations of args and verify outputs against the recorded approval file.
Run func with all possible combinations of args and verify outputs against the recorded approval file .
# enforce keyword arguments - https://www.python.org/dev/peps/pep-3102/ """Run func with all possible combinations of args and verify outputs against the recorded approval file.

    Args:
        function_under_test (function): function under test.
        input_arguments: list of values to test for each input argument.  For example, a function f(product, quantity)
            could be tested with the input_arguments [['water', 'cola'], [1, 4]], which would result in outputs for the
            following calls being recorded and verified: f('water', 1), f('water', 4), f('cola', 1), f('cola', 4).
        formatter (function): function for formatting the function inputs/outputs before they are recorded to an
            approval file for comparison.
        reporter (approvaltests.reporter.Reporter): an approval reporter.

    Raises:
        ApprovalException: if the results to not match the approved results.
    """
if the results to not match the approved results.
if the results to not match the approved results .
ApprovalException
function_under_test
Callable
function under test.
function under test .
input_arguments
Sequence[Sequence[Any]]
list of values to test for each input argument.  For example, a function f(product, quantity)
could be tested with the input_arguments [['water', 'cola'], [1, 4]], which would result in outputs for the
following calls being recorded and verified: f('water', 1), f('water', 4), f('cola', 1), f('cola', 4).
list of values to test for each input argument . For example a function f ( product quantity ) could be tested with the input_arguments [[ ' water ' ' cola ' ] [ 1 4 ]] which would result in outputs for the following calls being recorded and verified : f ( ' water ' 1 ) f ( ' water ' 4 ) f ( ' cola ' 1 ) f ( ' cola ' 4 ) .
formatter
Optional[Callable]
function for formatting the function inputs/outputs before they are recorded to an
approval file for comparison.
function for formatting the function inputs / outputs before they are recorded to an approval file for comparison .
reporter
Optional[ReporterForTesting]
an approval reporter.
an approval reporter .
options
Optional[Options]