Skip to content

Commit

Permalink
Add test on new check
Browse files Browse the repository at this point in the history
  • Loading branch information
keckler committed Oct 10, 2023
1 parent e3b4765 commit 836be51
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion armi/reactor/converters/tests/test_axialExpansionChanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from armi import materials
from armi.settings import Settings
from armi.materials import _MATERIAL_NAMESPACE_ORDER, custom
from armi.materials import _MATERIAL_NAMESPACE_ORDER, custom, ht9
from armi.reactor.assemblies import HexAssembly, grids
from armi.reactor.blocks import HexBlock
from armi.reactor.components import DerivedShape, UnshapedComponent
Expand All @@ -38,6 +38,7 @@
from armi.reactor.blueprints.tests.test_blockBlueprints import FULL_BP
from armi.reactor import blueprints
from armi.tests import TEST_ROOT, mockRunLogs
from armi.utils.customExceptions import InputError
from armi.utils import units
from numpy import array, linspace, zeros

Expand Down Expand Up @@ -355,6 +356,17 @@ def _getMass(a):
newMass = a.getMass("B10")
return newMass

def test_checkForBlocksWithoutSolids(self):
a = buildTestAssemblyWithFakeMaterial(
name="Sodium"
) # every component is sodium
changer = AxialExpansionChanger(detailedAxialExpansion=True)
changer.setAssembly(a) # no error because _everything_ is sodium

a[0][1].material = ht9.HT9()
with self.assertRaises(InputError):
changer.setAssembly(a)

def test_PrescribedExpansionContractionConservation(self):
"""Expand all components and then contract back to original state.
Expand Down

0 comments on commit 836be51

Please sign in to comment.