Exemplo n.º 1
0
def test_skipif_no_ssh():
    with patch.dict("os.environ", {"REPROMAN_TESTS_SSH": "1"}):
        try:
            skipif.no_ssh()
        except pytest.skip.Exception as exc:
            assert 0, "Test should not have been skipped"

        # We skip SSH on windows even when REPROMAN_TESTS_SSH is set.
        with patch("reproman.tests.skip._on_windows", True):
            with pytest.raises(pytest.skip.Exception):
                skipif.no_ssh()
Exemplo n.º 2
0
def ssh_slurm():
    skipif.no_ssh()
    skipif.no_slurm()
    from reproman.resource.ssh import SSH
    return SSH("slurm-res", host="slurm")
Exemplo n.º 3
0
def ssh_lsf():
    skipif.no_ssh()
    if not lsf_config:
        pytest.skip("no LSF test configuration")
    from reproman.resource.ssh import SSH
    return SSH("lsf-res", host=lsf_config["host"], user=lsf_config["user"])
Exemplo n.º 4
0
def ssh():
    skipif.no_ssh()
    from reproman.resource.ssh import SSH
    return SSH("testssh", host="reproman-test")