Skip to content

Commit

Permalink
Skip rejection limit test for MPI config
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano committed May 15, 2024
1 parent ca3ba80 commit da08d77
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/unit_tests/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import pytest
from pytest import approx

from tests.regression_tests import config


def test_source():
space = openmc.stats.Point()
Expand Down Expand Up @@ -205,6 +207,7 @@ def test_constraints_file(sphere_box_model, run_in_tmpdir):
openmc.lib.finalize()


@pytest.mark.skipif(config['mpi'], reason='Not compatible with MPI')
def test_rejection_limit(sphere_box_model, run_in_tmpdir):
model, cell1 = sphere_box_model[:2]

Expand All @@ -214,9 +217,11 @@ def test_rejection_limit(sphere_box_model, run_in_tmpdir):
constraints={'domains': [cell1]}
)

# Confirm that OpenMC doesn't run in an infinite loop
# Confirm that OpenMC doesn't run in an infinite loop. Note that this may
# work when running with MPI since it won't necessarily capture the error
# message correctly
with pytest.raises(RuntimeError, match="rejected"):
model.run()
model.run(openmc_exec=config['exe'])


def test_exceptions():
Expand Down

0 comments on commit da08d77

Please sign in to comment.