def _collect_soft_chain(self): """ Build the soft-chain if it is not already defined and return the chain """ if not self.nodes: files = ChainUtil.get_alter_files() self.nodes = ChainUtil.build_soft_chain(files) return self.nodes
def help_test_missing_alter(self, search, error): AlterUtil.create_alters([1]) AlterUtil.run_alters() alter_files = ChainUtil.get_alter_files() self.assertEqual(len(alter_files), 2) # up and down os.remove([i for i in alter_files if search in i].pop()) try: sys.argv = make_argv([]) self.checkCommand.run() except error: pass
def run(self, inline=False): """ Check that the alter chain is valid """ # TODO Check that the alter chain is in line with the DB (but not necessarily up to date) # TODO Make the verbose flag do something based on previous additions # TODO Add flags to only perform certain checks (as described in the other todos) if not inline: (options, args) = self.parser.parse_args() self.files = ChainUtil.get_alter_files() # implicitly check validity of chain (integrity check) chain = ChainUtil.build_chain() # all other checks self.check_abandoned_alters(chain) self.check_missing_pair() if not inline: print("Everything looks good!\n")
def run(self, inline=False): """ Check that the alter chain is valid """ # TODO Check that the alter chain is in line with the DB (but not necessarily up to date) # TODO Make the verbose flag do something based on previous additions # TODO Add flags to only perform certain checks (as described in the other todos) if not inline: # (options, args) = self.parser.parse_args() self.parser.parse_args() self.files = ChainUtil.get_alter_files() # implicitly check validity of chain (integrity check) chain = ChainUtil.build_chain() # all other checks self.check_abandoned_alters(chain) self.check_missing_pair() if not inline: print("Everything looks good!\n")