armi.tests.test_interfaces module

Tests the Interface.

class armi.tests.test_interfaces.DummyInterface(r, cs)[source]

Bases: Interface

Construct an interface.

The r and cs arguments are required, but may be None, where appropriate for the specific Interface implementation.

Parameters:
  • r (Reactor) – A reactor to attach to

  • cs (Settings) – Settings object to use

Raises:

RuntimeError – Interfaces derived from Interface must define their name

name: Optional[str] = 'Dummy'

The name of the interface. This is undefined for the base class, and must be overridden by any concrete class that extends this one.

function = 'dummyAction'

The function performed by an Interface. This is not required be be defined by implementations of Interface, but is used to form categories of interfaces.

class armi.tests.test_interfaces.TestCodeInterface(methodName='runTest')[source]

Bases: TestCase

Test Code interface.

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

Tests notification of detail points.

test_enabled()[source]

Test turning interfaces on and off.

test_nameContains()[source]
test_distributable()[source]
test_preDistributeState()[source]
test_duplicate()[source]
class armi.tests.test_interfaces.TestTightCoupler(methodName='runTest')[source]

Bases: TestCase

Test the tight coupler class.

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_couplerActive()[source]
test_storePreviousIterationValue()[source]
test_storePreviousIterationValueException()[source]
test_isConvergedValueError()[source]
test_isConverged()[source]

Ensure TightCoupler.isConverged() works with float, 1D list, and ragged 2D list.

Notes

2D lists can end up being ragged as assemblies can have different number of blocks. Ragged lists are easier to manage with lists as opposed to numpy.arrays, namely, their dimension is preserved.

test_isConvergedRuntimeError()[source]

Test to ensure 3D arrays do not work.

test_getListDimension()[source]