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: MockComposite

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

Bases: MockCompositeGrandParent

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

Bases: MockCompositeParent

class armi.reactor.tests.test_parameters.ParameterTests(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_mutableDefaultsNotSupported()[source]
test_writeSomeParamsToDB()[source]

This tests the ability to specify which parameters should be written to the database. It assumes that the list returned by ParameterDefinitionCollection.toWriteToDB() is used to filter for which parameters to include in the database.

test_serializer_pack_unpack()[source]

This tests the ability to add a serializer to a parameter instantiation line. It assumes that if this parameter is not None, that the pack and unpack methods will be called during storage to and reading from the database. See database3._writeParams for an example use of this functionality.

test_paramPropertyDoesNotConflict()[source]
test_paramPropertyDoesNotConflictWithNoneDefault()[source]
test_getWithoutDefaultRaisesParameterError()[source]
test_attemptingToSetParamWithoutSetterFails()[source]
test_setter()[source]

Test the Parameter setter() tooling, that signifies if a Parameter has been updated.

test_setterGetterBasics()[source]

Test the Parameter setter/getter tooling, through the lifecycle of a Parameter being updated.

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]

Tests we prevent accidental creation of attributes.