def teardown_tmp_repo(): """ Remove the test repo """ log.info(__name__ + ':: Tearing down test repo.') chdir(config['deploy.test_repo']) rmtree(config['deploy.test_repo'])
def init_tmp_repo(): """ Create a test repo, change to directory """ log.info(__name__ + ':: Creating test repo.') if exists(config['deploy.test_repo']): rmtree(config['deploy.test_repo']) mkdir(config['deploy.test_repo']) Repo.init(config['deploy.test_repo']) chdir(config['deploy.test_repo'])