Пример #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)
Пример #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)
Пример #3
0
def test_mixed_function():
    assert inspect_function_arguments(mix_function) == (['some'], True)
Пример #4
0
def test_get_kwargs():
    assert inspect_function_arguments(kwargs_function) == ([], True)
Пример #5
0
def test_mixed_function():
    assert inspect_function_arguments(mix_function) == (['some'], True)
Пример #6
0
def test_get_kwargs():
    assert inspect_function_arguments(kwargs_function) == ([], True)