def test_relation1(wish_permutate_args): relation = wish_permutate_args permutated_assert([relation(1, 20), 1], [relation(180, -2), -180]) with pytest.raises(AssertionError): permutated_assert([relation(1, 20), 1], [relation(180, -2), -180], [relation(180, -2), 2])
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_relation2(wish_permutate_args): relation = wish_permutate_args permutated_assert([relation(20, 1), 1], [relation(-180, -2), -2], [relation(180, -2), 2])