Beispiel #1
0
def test_proccommandline_test4(m_procfiles):
    """
    Test that the correct method is selected based on the command-line.
    """

    job = {"executable": "charmm", "executableargs": ["input.file"]}

    _proccommandline(job, [], [], {})

    assert m_procfiles.call_count == 1
    assert m_procfiles.call_args[0][1] == "input.file"
Beispiel #2
0
def test_proccommandline_test2(m_procfiles):
    """
    Test that the correct method is selected based on the command-line.
    """

    job = {
        "executable": "pmemd.MPI",
        "executableargs": ["-c", "file", "-i", "file", "-p", "file"]
    }

    _proccommandline(job, [], [], {})

    assert m_procfiles.call_count == 3
    assert m_procfiles.call_args[0][1] == "file"
Beispiel #3
0
def test_proccommandline_test3(m_procfiles):
    """
    Test that the correct method is selected based on the command-line.
    """

    job = {
        "executable": "gmx",
        "executableargs": ["mdrun_mpi", "-deffnm", "filename"]
    }

    _proccommandline(job, [], [], {})

    assert m_procfiles.call_count == 1
    assert m_procfiles.call_args[0][1] == "filename"
Beispiel #4
0
def test_proccommandline_except():
    """
    Test if the exception is raised if command-line is bad.
    """

    job = {
        "executable": "pmemd.MPI",
        "executableargs": ["", "", ""],
        "jobname": "jobone"
    }

    with pytest.raises(exceptions.RequiredinputError):

        _proccommandline(job, [], [], {})