def test_permutated_assert(): decorated_pow = utils.permutate_decorator(pow) assertions.permutated_assert( [decorated_pow(2, 3), 8], [decorated_pow(2, 4), 16], [decorated_pow(2, 5), 32], ) assertions.permutated_assert( [decorated_pow(2, 3), 9], [decorated_pow(2, 4), 16], [decorated_pow(2, 5), 25], ) with raises(AssertionError): assertions.permutated_assert( [decorated_pow(2, 3), 8], [decorated_pow(2, 5), 25], )
def test_permutate_decorator(): decorated_pow = utils.permutate_decorator(pow) invocations = decorated_pow(2, 3) assert isinstance(invocations, utils.PermutatedInvocationResults) assert 8 in invocations.results assert 9 in invocations.results