armi.reactor.tests.test_composites module

Tests for the composite pattern.

class armi.reactor.tests.test_composites.MockBP[source]

Bases: object

allNuclidesInProblem

meta hide-value:

activeNuclides

meta hide-value:

inactiveNuclides = {}
elementsToExpand = {}
customIsotopics = {}
armi.reactor.tests.test_composites.getDummyParamDefs()[source]
class armi.reactor.tests.test_composites.DummyComposite(name, i=0)[source]

Bases: Composite

pDefs = <armi.reactor.parameters.parameterDefinitions.ParameterDefinitionCollection object>
paramCollectionType

alias of DummyCompositeParameterCollection

class armi.reactor.tests.test_composites.DummyLeaf(name, i=0)[source]

Bases: Composite

pDefs = <armi.reactor.parameters.parameterDefinitions.ParameterDefinitionCollection object>
getChildren(deep=False, generationNum=1, includeMaterials=False, predicate=None)[source]

Return empty list, representing that this object has no children.

getChildrenWithFlags(typeSpec: Optional[Union[Flag, auto, Sequence[Union[Flag, auto]]]], exactMatch=True)[source]

Return empty list, representing that this object has no children.

getBoundingCircleOuterDiameter(Tc=None, cold=False)[source]
iterComponents(typeSpec=None, exact=False)[source]
paramCollectionType

alias of DummyLeafParameterCollection

class armi.reactor.tests.test_composites.TestCompositePattern(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_composite()[source]

Test basic Composite things.

test_iterComponents()[source]
test_getChildren()[source]

Test the get children method.

test_getName()[source]

Test the getName method.

test_sort()[source]
test_areChildernOfType()[source]
test_containsAtLeastOneChildOfType()[source]
test_containsOnlyChildrenOfType()[source]
test_nameContains()[source]
test_nucSpec()[source]
test_hasFlags()[source]

Ensure flags are queryable.

test_hasFlagsSubstring()[source]

Make sure typespecs with the same word in them no longer match.

test_hasFlagsNoTypeSpecified()[source]
test_getBoundingCirlceOuterDiameter()[source]
test_getParamNames()[source]
test_updateVolume()[source]
test_expandLFPs()[source]
test_getIntegratedMgFlux()[source]
test_getReactionRates()[source]
test_syncParameters()[source]
class armi.reactor.tests.test_composites.TestCompositeTree(*args, **kwargs)[source]

Bases: TestCase

blueprintYaml = '\n    name: test assembly\n    height: [1, 1]  # 2 blocks\n    axial mesh points: [1, 1]\n    xs types: [A, A]\n    specifier: AA\n    blocks:\n    - &block_metal_fuel\n        name: metal fuel\n        fuel: &component_metal_fuel_fuel\n            shape: Circle\n            material: UZr\n            Tinput: 500\n            Thot: 500.0\n            id: 0.0\n            od: 1.0\n            mult: 7\n        clad: &component_metal_fuel_clad\n            shape: Circle\n            material: HT9\n            Tinput: 450.0\n            Thot: 450.0\n            id: 1.09\n            od: 1.1\n            mult: 7\n        bond: &component_metal_fuel_bond\n            shape: Circle\n            material: Sodium\n            Tinput: 450.0\n            Thot: 450.0\n            id: fuel.od\n            od: clad.id\n            mult: 7\n        coolant: &component_metal_fuel_coolant\n            shape: DerivedShape\n            material: Sodium\n            Tinput: 450.0\n            Thot: 450.0\n        duct: &component_metal_fuel_duct\n            shape: Hexagon\n            material: HT9\n            Tinput: 25.0\n            Thot: 450.0\n            ip: 16.0\n            mult: 1.0\n            op: 16.6\n    - &block_oxide_fuel\n        name: mox fuel\n        fuel:\n            <<: *component_metal_fuel_fuel\n            material: MOX\n        clad: *component_metal_fuel_clad\n        bond: *component_metal_fuel_bond\n        coolant: *component_metal_fuel_coolant\n        duct: *component_metal_fuel_duct\n        '
test_ordering()[source]
test_summing()[source]
test_constituentReport()[source]
test_getNuclides()[source]

The getNuclides should return all keys that have ever been in this block, including values that are at trace.

test_getFuelMass()[source]

This test creates a dummy assembly and ensures that the assembly, block, and fuel component masses are consistent. getFuelMass ensures that the fuel component is used to getMass.

test_getNeutronEnergyDepositionConstants()[source]

Until we improve test architecture, this test can not be more interesting.

test_getGammaEnergyDepositionConstants()[source]

Until we improve test architecture, this test can not be more interesting.

test_getChildrenIncludeMaterials()[source]

Test that the StateRetainer retains material properties when they are modified.

test_getHMMass()[source]
test_getFPMass()[source]
test_getFissileMass()[source]
test_getMaxParam()[source]

Test getMaxParam().

test_getMinParam()[source]

Test getMinParam().

class armi.reactor.tests.test_composites.TestFlagSerializer(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

class TestFlagsA(init=0)[source]

Bases: Flag

A = <TestFlagsA.A: 1>
B = <TestFlagsA.B: 2>
C = <TestFlagsA.C: 4>
D = <TestFlagsA.D: 8>
class TestFlagsB(init=0)[source]

Bases: Flag

A = <TestFlagsB.A: 1>
B = <TestFlagsB.B: 2>
BPRIME = <TestFlagsB.BPRIME: 4>
C = <TestFlagsB.C: 8>
D = <TestFlagsB.D: 16>
test_flagSerialization()[source]
test_flagConversion()[source]
class armi.reactor.tests.test_composites.TestMiscMethods(methodName='runTest')[source]

Bases: TestCase

Test a variety of methods on the composite.

these may get moved to composted classes in the future.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_setMass()[source]

Test setting and retrieving mass.

test_getNumberDensities()[source]

Get number densities from composite.

test_getNumberDensitiesWithExpandedFissionProducts()[source]

Get number densities from composite.

test_dimensionReport()[source]
test_printDensities()[source]
test_getAtomicWeight()[source]
test_containsHeavyMetal()[source]
test_copyParamsToChildren()[source]
test_copyParamsFrom()[source]
class armi.reactor.tests.test_composites.TestGetReactionRateDict(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_getReactionRateDict()[source]