Exemplo n.º 1
0
def test_get_proper_argument_list():
    """Test get the proper argument list of the decorated function."""

    assert len(inspect_function_arguments(stub_function)[0]) == 2
    assert inspect_function_arguments(stub_function) == (['foo', 'bar'], False)

    decorated_stub_function = the_decorator(stub_function)
    assert len(inspect_function_arguments(decorated_stub_function)[0]) == 2
    assert inspect_function_arguments(decorated_stub_function) == (['foo', 'bar'], False)
Exemplo n.º 2
0
def test_get_proper_argument_list():
    """Test get the proper argument list of the decorated function."""

    assert len(inspect_function_arguments(stub_function)[0]) == 2
    assert inspect_function_arguments(stub_function) == (['foo', 'bar'], False)

    decorated_stub_function = the_decorator(stub_function)
    assert len(inspect_function_arguments(decorated_stub_function)[0]) == 2
    assert inspect_function_arguments(decorated_stub_function) == ([
        'foo', 'bar'
    ], False)
Exemplo n.º 3
0
def test_mixed_function():
    assert inspect_function_arguments(mix_function) == (['some'], True)
Exemplo n.º 4
0
def test_get_kwargs():
    assert inspect_function_arguments(kwargs_function) == ([], True)
Exemplo n.º 5
0
def test_mixed_function():
    assert inspect_function_arguments(mix_function) == (['some'], True)
Exemplo n.º 6
0
def test_get_kwargs():
    assert inspect_function_arguments(kwargs_function) == ([], True)