def test_loop_two_control_vars(self, iter_type): # this should work the same for both iteration types tlh = LoggingHandler.create_fresh_handler() run_section([{'for $i, $j {0} $foo'.format(iter_type): [{'log_i': '$i, $j'}]}], {'foo': {'bar': 'barval', 'spam': 'spamval'}}) assert ('INFO', 'bar, barval') in tlh.msgs assert ('INFO', 'spam, spamval') in tlh.msgs
def setup_method(self, method): self.ya = yaml_assistant.YamlAssistant('ya', {}, '', None) self.ya.role = 'crt' self.ya._files = {'first': {'source': 'f/g'}, 'second': {'source': 's/t'}} self.ya._dependencies = [{'rpm': ['foo']}] self.ya._dependencies_a = [{'rpm': ['bar']}] self.ya._pre_run = [{'log_i': 'pre'}] self.ya._run = [{'log_i': 'run'}] self.ya._post_run = [{'log_i': 'post'}] self.tlh = LoggingHandler.create_fresh_handler()
def test_loop_two_control_vars(self, iter_type): # this should work the same for both iteration types tlh = LoggingHandler.create_fresh_handler() run_section([{ 'for $i, $j {0} $foo'.format(iter_type): [{ 'log_i': '$i, $j' }] }], {'foo': { 'bar': 'barval', 'spam': 'spamval' }}) assert ('INFO', 'bar, barval') in tlh.msgs assert ('INFO', 'spam, spamval') in tlh.msgs
def setup_method(self, method): self.ya = yaml_assistant.YamlAssistant('ya', {}, '', None) self.ya.role = 'crt' self.ya._files = { 'first': { 'source': 'f/g' }, 'second': { 'source': 's/t' } } self.ya._dependencies = [{'rpm': ['foo']}] self.ya._dependencies_a = [{'rpm': ['bar']}] self.ya._pre_run = [{'log_i': 'pre'}] self.ya._run = [{'log_i': 'run'}] self.ya._post_run = [{'log_i': 'post'}] self.tlh = LoggingHandler.create_fresh_handler()
def setup_method(self, method): self.old_command_runners = command_runners.command_runners command_runners.command_runners = copy.deepcopy( self.old_command_runners) self.tlh = LoggingHandler.create_fresh_handler()
def setup_method(self, method): self.tlh = LoggingHandler.create_fresh_handler()
def setup_method(self, method): self.ya = yaml_assistant.YamlAssistant('ya', {}, '', None) self.ya.role = 'twk' self.ya._files = {} self.tlh = LoggingHandler.create_fresh_handler() self.dda = {'project_type': ['foo', 'bar', 'baz']}
def setup_method(self, method): if os.path.exists(self.cf): os.unlink(self.cf) self.cch = Cache() self.tlh = LoggingHandler.create_fresh_handler()
def setup_method(self, method): self.ccr = UseCommandRunner self.tlh = LoggingHandler.create_fresh_handler()
def test_version_action(self): tlh = LoggingHandler.create_fresh_handler() va = actions.VersionAction() from devassistant import __version__ as VERSION va.run() assert VERSION in tlh.msgs[0][1]
def setup_method(self, method): self.tlh = LoggingHandler() self.oldinp = CliDialogHelper.inp
def setup_method(self, method): self.yl = YamlAssistantLoader self.reset_yl_assistants_dirs() self.yl._assistants = {} self.tlh = LoggingHandler.create_fresh_handler()
def setup_method(self, method): self.da = actions.DocAction self.tlh = LoggingHandler.create_fresh_handler()
def setup_method(self, method): self.old_command_runners = command_runners.command_runners command_runners.command_runners = copy.deepcopy(self.old_command_runners) self.tlh = LoggingHandler.create_fresh_handler()