armi.reactor.tests.test_parameters module

tests of the Parameters class

class armi.reactor.tests.test_parameters.MockComposite(name)[source]

Bases: object

class armi.reactor.tests.test_parameters.MockCompositeGrandParent(name)[source]

Bases: armi.reactor.tests.test_parameters.MockComposite

class armi.reactor.tests.test_parameters.MockCompositeParent(name)[source]

Bases: armi.reactor.tests.test_parameters.MockCompositeGrandParent

class armi.reactor.tests.test_parameters.MockCompositeChild(name)[source]

Bases: armi.reactor.tests.test_parameters.MockCompositeParent

class armi.reactor.tests.test_parameters.ParameterTests(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_mutableDefaultsNotSupported()[source]
test_paramPropertyDoesNotConflict()[source]
test_paramPropertyDoesNotConflictWithNoneDefault()[source]
test_getWithoutDefaultRaisesParameterError()[source]
test_attemptingToSetParamWithoutSetterFails()[source]
test_setter()[source]
test_setterGetterBasics()[source]
test_cannotDefineParameterWithSameName()[source]
test_paramDefinitionsCompose()[source]
test_cannotDefineParameterWithSameNameForCollectionSubclass()[source]
test_cannotCreateAttrbuteOnParameterCollectionSubclass()[source]
test_cannotCreateInstanceOf_NoDefault()[source]
test_cannotCreateInstanceOf_Undefined()[source]
test_defaultLocation()[source]
test_categories()[source]
test_parameterCollectionsHave__slots__()[source]

Make sure something is implemented to prevent accidental creation of attributes

class armi.reactor.tests.test_parameters.MockSyncPC(_state: Optional[List[Any]] = None)[source]

Bases: armi.reactor.parameters.parameterCollections.ParameterCollection

Create a new ParameterCollection instance.

Parameters

_state – Optional list of parameter values, ordered by _allFields. Passed values should come from a call to __getstate__(). This should only be used internally to this model.

pDefs: armi.reactor.parameters.parameterDefinitions.ParameterDefinitionCollection = <armi.reactor.parameters.parameterDefinitions.ParameterDefinitionCollection object>
pb = <armi.reactor.parameters.parameterDefinitions.ParameterBuilder object>
armi.reactor.tests.test_parameters.makeComp(name)[source]
class armi.reactor.tests.test_parameters.SynchronizationTests[source]

Bases: object

Some unit tests that must be run with mpirun instead of the standard unittest system.

run(testNamePrefix='mpitest_')[source]
write(msg)[source]
assertRaises(exceptionType)[source]
assertEqual(expected, actual)[source]
assertNotEqual(expected, actual)[source]
mpitest_noConflicts()[source]
mpitest_noConflicts_setByString()[source]

Make sure params set by string also work with sync.

mpitest_withConflicts()[source]
mpitest_withConflictsButSameValue()[source]
mpitest_noConflictsMaintainWithStateRetainer()[source]
mpitest_conflictsMaintainWithStateRetainer()[source]
mpitest_rxCoeffsProcess()[source]

This test mimics the process for rxCoeffs when doing distributed doppler