armi.tests.test_mpiParameters module

Tests of the MPI portion of the Parameters class.

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

Bases: 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: ParameterDefinitionCollection = <armi.reactor.parameters.parameterDefinitions.ParameterDefinitionCollection object>
pb = <armi.reactor.parameters.parameterDefinitions.ParameterBuilder object>
armi.tests.test_mpiParameters.makeComp(name)[source]

Helper method for MPI sync tests: mock up a Composite with a minimal param collections.

class armi.tests.test_mpiParameters.SynchronizationTests(methodName='runTest')[source]

Bases: TestCase

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

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_noConflicts()[source]

Make sure sync works across processes.

test_withConflicts()[source]

Test conflicts arise correctly if we force a conflict.

test_withConflictsButSameValue()[source]

Test that conflicts are ignored if the values are the same.

test_conflictsMaintainWithStateRetainer()[source]

Test that the state retainer fails correctly when it should.