def test_required_arguments_of_no_args(): def f(): pass defaults = utils.required_arguments(f) assert defaults == []
def test_required_arguments_of(): def f(a, b=2, c=None, *args, **kwargs): pass defaults = utils.required_arguments(f) assert defaults == ["a"]