def do_init(_args): """Initialize the current working directory as environment repo""" repo = init_repo(Path.cwd()) log.info('Initialized empty alfa-ci repository in %s', repo.location)
def test_init_repo(tmp_path): init_repo(tmp_path)
def test_init_repo_existing(empty_initialized_repo): with pytest.raises(Error): init_repo(empty_initialized_repo)
def empty_initialized_repo(tmp_path): """Create empty repo""" init_repo(str(tmp_path)) return tmp_path