From e2000f4be2cb91358b70effc28b563272ac408d2 Mon Sep 17 00:00:00 2001 From: Ethan Peterson Date: Wed, 27 Mar 2024 08:27:31 -0400 Subject: [PATCH] adding test for DAGSets explicitly --- test/test_basic.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/test_basic.py b/test/test_basic.py index a5af97c..4cff499 100644 --- a/test/test_basic.py +++ b/test/test_basic.py @@ -331,6 +331,8 @@ def test_area(request): def test_add_groups(request): test_file = str(request.path.parent / 'fuel_pin.h5m') model = dagmc.DAGModel(test_file) + volumes = model.volumes + surfaces = model.surfaces for group in model.groups.values(): group.delete() @@ -338,19 +340,19 @@ def test_add_groups(request): assert len(model.groups) == 0 group_map = {("mat:fuel", 1): [1, 2], - ("mat:Graveyard", 0): [6], + ("mat:Graveyard", 0): [volumes[6]], ("mat:41", 2): [3], - ("boundary:Reflecting", 3): [27, 28, 29] + ("boundary:Reflecting", 3): [27, 28, 29], + ("boundary:Vacuum", 4): [surfaces[24], surfaces[25]] } model.add_groups(group_map) groups = model.groups - volumes = model.volumes - surfaces = model.surfaces - assert len(groups) == 4 + assert len(groups) == 5 assert [1, 2] == sorted(groups['mat:fuel'].get_volume_ids()) assert [6] == groups['mat:Graveyard'].get_volume_ids() assert [3] == groups['mat:41'].get_volume_ids() assert [27, 28, 29] == sorted(groups['boundary:Reflecting'].get_surface_ids()) + assert [24, 25] == sorted(groups['boundary:Vacuum'].get_surface_ids())