Ejemplo n.º 1
0
 def test_arguments(self):
     for method in _get_handler_methods(ArgInfoLibrary()):
         handler = _PythonHandler(LibraryMock(), method.__name__, method)
         args = handler.arguments
         argspec = (args.positional, args.defaults, args.varargs, args.kwargs)
         expected = eval(method.__doc__)
         assert_equals(argspec, expected, method.__name__)
Ejemplo n.º 2
0
 def test_get_arg_info(self):
     for method in _get_handler_methods(ArgInfoLibrary()):
         handler = _PythonHandler(LibraryMock(), method.__name__, method)
         expected = eval(method.__doc__)
         assert_equals(handler.arguments._get_arg_spec(method),
                       expected, method.__name__)