def test_argument_decorator(self):
        application = Application()

        @application.argument('foo', description='Foo', required=True, is_list=True)
        def decorated_foo_code(i, o):
            """Foo Description"""
            o.writeln('called')

        self.assertTrue(application.has('decorated_foo_code'))

        command = application.get('decorated_foo_code')
        self.assertEqual(command._code, decorated_foo_code)
        self.assertEqual(command.get_description(), 'Foo Description')

        argument = command.get_definition().get_argument('foo')
        self.assertEqual('Foo', argument.get_description())
        self.assertTrue(argument.is_required())
        self.assertTrue(argument.is_list())
@Application.argument decorator should register a command with a specific argument
dataset/ETHPy150Open sdispater/cleo/tests/test_application.py/ApplicationTest.test_argument_decorator