From 836be51b2b5481465ef38a59aefd14794b4fceea Mon Sep 17 00:00:00 2001 From: Chris Keckler Date: Tue, 10 Oct 2023 20:41:50 +0100 Subject: [PATCH] Add test on new check --- .../converters/tests/test_axialExpansionChanger.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/armi/reactor/converters/tests/test_axialExpansionChanger.py b/armi/reactor/converters/tests/test_axialExpansionChanger.py index f32da3180..151bf3592 100644 --- a/armi/reactor/converters/tests/test_axialExpansionChanger.py +++ b/armi/reactor/converters/tests/test_axialExpansionChanger.py @@ -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 @@ -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 @@ -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.