Skip to content

Commit

Permalink
expand scope of exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyjmurray committed Dec 18, 2024
1 parent 19316be commit 9b73727
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/unit/mpi/test_mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

try:
from mpi4py import MPI
except ImportError:
except (ImportError, RuntimeError):
MPI = None


class MPITester:

@pytest.mark.skipif(MPI is None, reason="mpi4py is not installed.")
@pytest.mark.skipif(MPI is None, reason="mpi4py could not be imported")
def test_all(self, capfd: pytest.LogCaptureFixture):
current_filepath = Path(os.path.abspath(__file__))
to_run = current_filepath.parents[0] / Path('run_me_with_mpiexec.py')
Expand Down

0 comments on commit 9b73727

Please sign in to comment.