From e0be9de08625b00fe0f764a505612a5268c1ecec Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 28 Sep 2022 09:33:48 -0500 Subject: [PATCH] Apply @shimwell suggestions from code review Co-authored-by: Jonathan Shimwell --- tests/unit_tests/test_source.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit_tests/test_source.py b/tests/unit_tests/test_source.py index 7558d82381..ca3ee7f551 100644 --- a/tests/unit_tests/test_source.py +++ b/tests/unit_tests/test_source.py @@ -110,7 +110,8 @@ def test_rejection(run_in_tmpdir): ) cell1 = openmc.Cell(fill=mat, region=-sph1) cell2 = openmc.Cell(fill=mat, region=-sph2) - cell3 = openmc.Cell(region=+sph1 & +sph2 & -cube) + non_source_region = +sph1 & +sph2 & -cube + cell3 = openmc.Cell(region=non_source_region) model = openmc.Model() model.geometry = openmc.Geometry([cell1, cell2, cell3]) model.settings.particles = 100 @@ -130,5 +131,6 @@ def test_rejection(run_in_tmpdir): joint_region = cell1.region | cell2.region for p in particles: assert p.r in joint_region + assert p.r not in non_source_region openmc.lib.finalize()