Пример #1
0
def test_default_values_of_no_args():
    def f():
        pass

    defaults = utils.default_values_of(f)
    assert defaults == []
Пример #2
0
def test_default_values_of():
    def f(a, b=2, c=None, *args, **kwargs):
        pass

    defaults = utils.default_values_of(f)
    assert defaults == ["b", "c", "args", "kwargs"]
Пример #3
0
def test_default_values_of():
    def f(a, b=2, c=None, *args, **kwargs):
        pass

    defaults = utils.default_values_of(f)
    assert defaults == ['b', 'c', 'args', 'kwargs']