示例#1
0
    def test_get_arguments_4(self):
        def test_func(a, b, c=4, *args, d, e, **kwargs):
            pass

        parser = Parser(test_func)
        self.my_assert(tuple(parser.get_arguments()),
                       (('a', 'b', 'c'), ('d', 'e'), ('args', ), ('kwargs', )))
示例#2
0
    def test_get_arguments_2(self):
        def test_func(a, b, c, d, *args):
            pass

        parser = Parser(test_func)
        self.my_assert(tuple(parser.get_arguments()),
                       (('a', 'b', 'c', 'd'), (), ('args', ), ()))