Skip to content

Commit

Permalink
Adding some more operator details to the test
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Nov 28, 2023
1 parent 6708983 commit 1a703d7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions armi/operators/tests/test_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,23 @@ def test_createOperator(self):
"""
cs = settings.Settings()
o = Operator(cs)
# high-level items
self.assertTrue(isinstance(o, Operator))
self.assertTrue(isinstance(o.cs, settings.Settings))

# validate some more nitty-gritty operator details come from settings
burnStepsSetting = cs["burnSteps"]
if not type(burnStepsSetting) == list:
burnStepsSetting = [burnStepsSetting]
self.assertEqual(o.burnSteps, burnStepsSetting)
self.assertEqual(o.maxBurnSteps, max(burnStepsSetting))

powerFracsSetting = cs["powerFractions"]
if powerFracsSetting:
self.assertEqual(o.powerFractions, powerFracsSetting)
else:
self.assertEqual(o.powerFractions, [[1] * cs["burnSteps"]])


class TestTightCoupling(unittest.TestCase):
def setUp(self):
Expand Down

0 comments on commit 1a703d7

Please sign in to comment.