Ejemplo n.º 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', )))
Ejemplo n.º 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', ), ()))