From d8425d2669b71efbda64a3fbdaf645cf8468e291 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 18 Jul 2022 06:48:51 -0500 Subject: [PATCH] Apply @shimwell suggestions from code review Co-authored-by: Jonathan Shimwell --- tests/unit_tests/test_lib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unit_tests/test_lib.py b/tests/unit_tests/test_lib.py index f1f84bff2..b57242983 100644 --- a/tests/unit_tests/test_lib.py +++ b/tests/unit_tests/test_lib.py @@ -829,6 +829,7 @@ def test_sample_external_source(run_in_tmpdir, mpi_intracomm): # Sample some particles and make sure they match specified source openmc.lib.init() particles = openmc.lib.sample_external_source(10, prn_seed=3) + assert len(particles) == 10 for p in particles: assert -5. < p.r[0] < 5. assert -5. < p.r[1] < 5. @@ -840,6 +841,7 @@ def test_sample_external_source(run_in_tmpdir, mpi_intracomm): # Using the same seed should produce the same particles other_particles = openmc.lib.sample_external_source(10, prn_seed=3) + assert len(other_particles) == 10 for p1, p2 in zip(particles, other_particles): assert p1.r == p2.r assert p1.u == p2.u