def test_option_decorator(self):
        application = Application()

        @application.option('foo', 'f', description='Foo', value_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')

        option = command.get_definition().get_option('foo')
        self.assertEqual('f', option.get_shortcut())
        self.assertEqual('Foo', option.get_description())
        self.assertTrue(option.is_value_required())
        self.assertTrue(option.is_list())
@Application.option decorator should register a command with a specific option
dataset/ETHPy150Open sdispater/cleo/tests/test_application.py/ApplicationTest.test_option_decorator