示例#1
0
 def install_conda(self, dry_run=False):
     print("Conda dependencies to be installed:")
     print(self.conda)
     if dry_run:
         return
     else:
         channels, packages = self._get_channels_packages()
         kconda.install_conda(packages, channels)
示例#2
0
def test_install():
    # TODO - write a conda installation test with a certain channel
    # TODO - add a conda channels for installing
    conda_deps = ["python=3.6", "pep8"]
    pip_deps = ["tqdm"]

    install_conda(conda_deps)
    install_pip(pip_deps)
示例#3
0
def test_install(monkeypatch):
    import kipoi
    import kipoi.conda.utils
    conda_deps = ["python=3.6", "pep8"]
    pip_deps = ["tqdm"]

    monkeypatch.setattr(kipoi.conda.utils, '_call_command', fake_call_command)

    main_cmd, cmd_list = install_conda(conda_deps)
    assert main_cmd == 'conda'
    assert cmd_list == ['install', '-y', '--channel=defaults', '--override-channels', 'pep8']

    main_cmd, cmd_list = install_pip(pip_deps)
    assert main_cmd == 'pip'
    assert cmd_list == ['install', 'tqdm']