Esempio n. 1
0
def do_install(_args):
    """Install environments"""
    repo = Repo(Path.cwd())
    for env in repo.envs:
        env.install()
Esempio n. 2
0
def do_list(_args):
    """Print the list of installed environments"""
    repo = Repo(Path.cwd())
    for env in repo.envs:
        print(env)
Esempio n. 3
0
def test_load_unitialized(tmp_path):
    with pytest.raises(Error):
        Repo(tmp_path)
Esempio n. 4
0
def test_load(empty_initialized_repo):
    Repo(empty_initialized_repo)
Esempio n. 5
0
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 == []
Esempio n. 6
0
def test_location(empty_initialized_repo):
    assert Repo(empty_initialized_repo).location == (empty_initialized_repo /
                                                     Repo.repo_dir)