Update tests/regression_tests/trigger_statepoint_restart/test.py

Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Alex Lyons 2020-03-19 16:37:11 +00:00 committed by Paul Romano
parent a7e924e545
commit bd71ac0588

View file

@ -12,11 +12,10 @@ from tests.regression_tests import config
def model():
# Materials
materials = openmc.Materials()
mat = openmc.Material()
mat.set_density('g/cm3', 4.5)
mat.add_nuclide('U235', 1.0)
materials.append(mat)
materials = openmc.Materials([mat])
# Geometry
sph = openmc.Sphere(r=10.0, boundary_type='vacuum')
@ -36,22 +35,18 @@ def model():
settings.verbosity = 1 # to test that this works even with no output
# Tallies
tallies = openmc.Tallies()
t = openmc.Tally()
t.scores = ['flux']
tallies.append(t)
tallies = openmc.Tallies([t])
# Plots (none)
plots = openmc.Plots()
# Put it all together
model = openmc.model.Model(materials=materials,
geometry=geometry,
settings=settings,
tallies=tallies,
plots=plots)
tallies=tallies)
return model
class TriggerStatepointRestartTestHarness(PyAPITestHarness):
def __init__(self, statepoint, model=None):
super().__init__(statepoint, model)
@ -125,6 +120,7 @@ class TriggerStatepointRestartTestHarness(PyAPITestHarness):
finally:
self._cleanup()
def test_trigger_statepoint_restart(model):
# Assuming we converge within 1000 batches, the statepoint filename
# should include the batch number padded by at least one '0'.