More robust exception handling for MPI tests
@@ -624,7 +624,9 @@ def _simulated_mpi_environment(**kwargs):
global _simulated_mpicomm
old_simulated_mpicomm = _simulated_mpicomm
_simulated_mpicomm = _DummyMPIComm(**kwargs)
+ try:
yield
+ finally:
_simulated_mpicomm = old_simulated_mpicomm
