armi.tests.test_plugins module

Provides functionality for testing implementations of plugins.

class armi.tests.test_plugins.PluginFlags1[source]

Bases: ArmiPlugin

Simple Plugin that defines a single, new flag.

static defineFlags()[source]

Function to provide new Flags definitions.

class armi.tests.test_plugins.SillyAxialExpansionChanger(detailedAxialExpansion: bool = False)[source]

Bases: AxialExpansionChanger

Fake, test-specific axial expansion changer that a plugin will register.

Build an axial expansion converter.

Parameters:

detailedAxialExpansion (bool, optional) – A boolean to indicate whether or not detailedAxialExpansion is to be utilized.

linked: Optional[AssemblyAxialLinkage]
expansionData: Optional[ExpansionData]
class armi.tests.test_plugins.SillyAxialPlugin[source]

Bases: ArmiPlugin

Trivial plugin that implements the axial expansion hook.

static getAxialExpansionChanger() type[armi.tests.test_plugins.SillyAxialExpansionChanger][source]
class armi.tests.test_plugins.BeforeReactorPlugin[source]

Bases: ArmiPlugin

Trivial plugin that implements the before reactor construction hook.

static beforeReactorConstruction(cs) None[source]
class armi.tests.test_plugins.TestPluginRegistration(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_defineFlags()[source]

Define a new flag using the plugin defineFlags() method.

test_axialExpansionHook()[source]

Test that plugins can override the axial expansion of assemblies via a hook.

test_passiveDBLoadPlugin()[source]
test_beforeReactorConstructionHook()[source]

Test that plugin hook successfully injects code before reactor initialization.

class armi.tests.test_plugins.TestPluginBasics(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_defineParameters()[source]

Test that the default ARMI plugins are correctly defining parameters.

test_exposeInterfaces()[source]

Make sure that the exposeInterfaces hook is properly implemented.

test_pluginsExposeInterfaces()[source]

Make sure that plugins properly expose their interfaces, by checking some known examples.

class armi.tests.test_plugins.TestPlugin(methodName='runTest')[source]

Bases: TestCase

This contains some sanity tests that can be used by implementing plugins.

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.

plugin: Optional[ArmiPlugin] = None
test_defineBlueprintsSections()[source]

Make sure that the defineBlueprintsSections hook is properly implemented.

test_exposeInterfaces()[source]

Make sure that the exposeInterfaces hook is properly implemented.