def test_store_buildlog(self): BuildLog.init(self.repo) for pkg in ['pkg1', 'pkg2', 'pkg1']: l, f = mkstemp(prefix='local-repo-test-buildlog-file-') BuildLog.store(pkg, f) self.assertIs(True, isfile(join(self.buildlog, pkg, basename(f))))
def init(path, config_file=Config.CONFIGFILE): ''' Needs the path to repo, or the repo name if specified in the config file ''' try: Config.init(path, config_file) LocalRepo._repo = Repo(Config.get('path', path)) Log.init(LocalRepo._repo.path) BuildLog.init(LocalRepo._repo.path) PkgbuildLog.init(LocalRepo._repo.path) except LocalRepoError as e: LocalRepo.error(e)