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.

class armi.tests.test_plugins.SillyAxialPlugin[source]

Bases: ArmiPlugin

Trivial plugin that implements the axial expansion hook.

static getAxialExpansionChanger() type[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 Case: Define a new, unique flag through the plugin pathway. T_ARMI_FLAG_EXTEND1
signature: test_defineFlags
requirements: R_ARMI_FLAG_EXTEND
Test Case: Load a plugin into an app and show it is loaded. T_ARMI_PLUGIN_REGISTER
signature: test_defineFlags
requirements: R_ARMI_PLUGIN
test_axialExpansionHook()[source]

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

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 Case: ARMI plugins define parameters, which appear on a new Block. T_ARMI_PLUGIN_PARAMS
signature: test_defineParameters
requirements: R_ARMI_PLUGIN_PARAMS
test_exposeInterfaces()[source]

Make sure that the exposeInterfaces hook is properly implemented.

Test Case: Plugins can add interfaces to the interface stack. T_ARMI_PLUGIN_INTERFACES0
signature: test_exposeInterfaces
test_pluginsExposeInterfaces()[source]

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

Test Case: Check that some known plugins correctly add interfaces to the stack. T_ARMI_PLUGIN_INTERFACES1
signature: test_pluginsExposeInterfaces
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: ArmiPlugin | None = 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.