def do_install(_args): """Install environments""" repo = Repo(Path.cwd()) for env in repo.envs: env.install()
def do_list(_args): """Print the list of installed environments""" repo = Repo(Path.cwd()) for env in repo.envs: print(env)
def test_load_unitialized(tmp_path): with pytest.raises(Error): Repo(tmp_path)
def test_load(empty_initialized_repo): Repo(empty_initialized_repo)
def test_envs(empty_initialized_repo): if sys.platform.startswith('linux'): assert len(Repo(empty_initialized_repo).envs) == 5 else: assert Repo(empty_initialized_repo).envs == []
def test_location(empty_initialized_repo): assert Repo(empty_initialized_repo).location == (empty_initialized_repo / Repo.repo_dir)