

def test_adding_already_set_definition_element_data(self):
    data = [[InputArgument('command', InputArgument.REQUIRED)], [InputOption('quiet', '', InputOption.VALUE_NONE)], [InputOption('query', 'q', InputOption.VALUE_NONE)]]
    for d in data:
        application = Application()
        application.set_auto_exit(False)
        application.set_catch_exceptions(False)
        application.register('foo').set_definition(d).set_code((lambda in_, out_: None))
        input_ = ListInput([('command', 'foo')])
        output_ = NullOutput()
        self.assertRaises(Exception, application.run, input_, output_)

dataset/ETHPy150Open sdispater/cleo/tests/test_application.py ApplicationTest.test_adding_already_set_definition_element_data/original