mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
added test to check dagmc name is in xml (#3657)
This commit is contained in:
parent
27e38e8946
commit
dcb7443711
2 changed files with 4 additions and 1 deletions
|
|
@ -302,6 +302,8 @@ class DAGMCUniverse(openmc.UniverseBase):
|
|||
dagmc_element = ET.Element('dagmc_universe')
|
||||
dagmc_element.set('id', str(self.id))
|
||||
|
||||
if self.name:
|
||||
dagmc_element.set('name', self.name)
|
||||
if self.auto_geom_ids:
|
||||
dagmc_element.set('auto_geom_ids', 'true')
|
||||
if self.auto_mat_ids:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ def model(request):
|
|||
|
||||
p = Path(request.fspath).parent / "dagmc.h5m"
|
||||
|
||||
daguniv = openmc.DAGMCUniverse(p, auto_geom_ids=True)
|
||||
daguniv = openmc.DAGMCUniverse(p, name='simple-dagmc', auto_geom_ids=True)
|
||||
|
||||
lattice = openmc.RectLattice()
|
||||
lattice.dimension = [2, 2]
|
||||
|
|
@ -232,6 +232,7 @@ def test_dagmc_xml(model):
|
|||
dagmc_ele = root.find('dagmc_universe')
|
||||
|
||||
assert dagmc_ele.get('id') == str(dag_univ.id)
|
||||
assert dagmc_ele.get('name') == str(dag_univ.name)
|
||||
assert dagmc_ele.get('filename') == str(dag_univ.filename)
|
||||
assert dagmc_ele.get('auto_geom_ids') == str(dag_univ.auto_geom_ids).lower()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue