Beispiel #1
0
def test_mpi_only_mpi(mpi_testdir, has_mpi4py):
    mpi_testdir.makepyfile(MPI_TEST_CODE)

    result = mpi_testdir.runpytest("--only-mpi")

    if has_mpi4py:
        result.assert_outcomes(**_fix_plural(passed=2, errors=1, skipped=2))
    else:
        result.assert_outcomes(**_fix_plural(errors=4, skipped=1))
Beispiel #2
0
def test_mpi_tmp_path(mpi_testdir, has_mpi4py):
    mpi_testdir.makepyfile(MPI_TMP_PATH_TEST_CODE)

    result = mpi_testdir.runpytest("--with-mpi", timeout=5)

    if has_mpi4py:
        result.assert_outcomes(passed=1)
    else:
        result.assert_outcomes(**_fix_plural(errors=1))