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