armi.utils.tests.test_utils module

Testing some utility functions

class armi.utils.tests.test_utils.TestGeneralUtils(methodName='runTest')[source]

Bases: unittest.case.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_mergeableDictionary()[source]
test_createFormattedStrWithDelimiter()[source]
test_capStrLen()[source]
test_list2str()[source]
test_slantSplit()[source]
test_prependToList()[source]
test_plotMatrix()[source]
test_classesInHierarchy()[source]

Tests the classesInHierarchy utility

Test Case: Tests that the Reactor is stored heirarchically TEST_REACTOR_HIERARCHY_0 ../_images/arrow-right-circle.svg
links outgoing: REQ_REACTOR_HIERARCHY

This test shows that the Blocks and Assemblies are stored heirarchically inside the Core, which is inside the Reactor object.

class armi.utils.tests.test_utils.CyclesSettingsTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

Check reading of the various cycle history settings for both the detailed and simple input options.

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.

detailedCyclesSettings = '\nmetadata:\n  version: uncontrolled\nsettings:\n  power: 1000000000.0\n  nCycles: 3\n  cycles:\n    - name: dog\n      cumulative days: [1, 2, 3]\n      power fractions: [0.1, 0.2, 0.3]\n      availability factor: 0.1\n    - cycle length: 10\n      burn steps: 5\n      power fractions: [0.2, 0.2, 0.2, 0.2, 0]\n      availability factor: 0.5\n    - name: ferret\n      step days: [3, R4]\n      power fractions: [0.3, R4]\n  runType: Standard\n'
simpleCyclesSettings = '\nmetadata:\n  version: uncontrolled\nsettings:\n  power: 1000000000.0\n  nCycles: 3\n  availabilityFactors: [0.1, R2]\n  cycleLengths: [1, 2, 3]\n  powerFractions: [0.1, 0.2, R1]\n  burnSteps: 3\n  runType: Standard\n  '
powerFractionsDetailedSolution = [[0.1, 0.2, 0.3], [0.2, 0.2, 0.2, 0.2, 0], [0.3, 0.3, 0.3, 0.3, 0.3]]
powerFractionsSimpleSolution = [[0.1, 0.1, 0.1], [0.2, 0.2, 0.2], [0.2, 0.2, 0.2]]
cycleNamesDetailedSolution = ['dog', None, 'ferret']
cycleNamesSimpleSolution = [None, None, None]
availabilityFactorsDetailedSolution = [0.1, 0.5, 1]
availabilityFactorsSimpleSolution = [0.1, 0.1, 0.1]
stepLengthsDetailedSolution = [[1, 1, 1], [1.0, 1.0, 1.0, 1.0, 1.0], [3, 3, 3, 3, 3]]
stepLengthsSimpleSolution = [[0.03333333333333333, 0.03333333333333333, 0.03333333333333333], [0.06666666666666667, 0.06666666666666667, 0.06666666666666667], [0.10000000000000002, 0.10000000000000002, 0.10000000000000002]]
cycleLengthsDetailedSolution = [30, 10, 15]
cycleLengthsSimpleSolution = [1, 2, 3]
burnStepsDetailedSolution = [3, 5, 5]
burnStepsSimpleSolution = [3, 3, 3]
nodesPerCycleDetailedSolution = [4, 6, 6]
nodesPerCycleSimpleSolution = [4, 4, 4]
maxBurnStepsDetailedSolution = 5
maxBurnStepsSimpleSolution = 3
test_getPowerFractions()[source]
test_getCycleNames()[source]
test_getAvailabilityFactors()[source]
test_getStepLengths()[source]
test_getCycleLengths()[source]
test_getBurnSteps()[source]
test_getMaxBurnSteps()[source]
test_getNodesPerCycle()[source]
test_getCycleNodeFromCumulativeStep()[source]
test_getCycleNodeFromCumulativeNode()[source]
test_getPreviousTimeNode()[source]
test_getCumulativeNodeNum()[source]