mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Fix: materials, plots, and tallies cannot be passed as lists (#3513)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
6b672f772f
commit
836bc487cf
2 changed files with 25 additions and 6 deletions
|
|
@ -892,3 +892,16 @@ def test_id_map_aligned_model():
|
|||
assert tr_cell == 20, f"Expected cell ID 20 at top-right corner, got {tr_cell}"
|
||||
assert tr_instance == 3, f"Expected cell instance 3 at top-right corner, got {tr_instance}"
|
||||
assert tr_material == 5, f"Expected material ID 5 at top-right corner, got {tr_material}"
|
||||
|
||||
def test_setter_from_list():
|
||||
mat = openmc.Material()
|
||||
model = openmc.Model(materials=[mat])
|
||||
assert isinstance(model.materials, openmc.Materials)
|
||||
|
||||
tally = openmc.Tally()
|
||||
model = openmc.Model(tallies=[tally])
|
||||
assert isinstance(model.tallies, openmc.Tallies)
|
||||
|
||||
plot = openmc.Plot()
|
||||
model = openmc.Model(plots=[plot])
|
||||
assert isinstance(model.plots, openmc.Plots)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue