def test_arguments_of(): def f(a, b=2, c=None, *args, **kwargs): pass defaults = utils.arguments_of(f) assert defaults == ["a", "b", "c", "args", "kwargs"]
def test_arguments_of_no_args(): def f(): pass defaults = utils.arguments_of(f) assert defaults == []
def test_arguments_of(): def f(a, b=2, c=None, *args, **kwargs): pass defaults = utils.arguments_of(f) assert defaults == ['a', 'b', 'c', 'args', 'kwargs']