armi.tests.test_user_plugins module
Tests for the UserPlugin class.
- class armi.tests.test_user_plugins.UserPluginFlags(*args, **kwargs)[source]
Bases:
UserPlugin
Simple UserPlugin that defines a single, new flag.
- class armi.tests.test_user_plugins.UserPluginFlags2(*args, **kwargs)[source]
Bases:
UserPlugin
Simple UserPlugin that defines a single, new flag.
- class armi.tests.test_user_plugins.UserPluginFlags3(*args, **kwargs)[source]
Bases:
UserPlugin
Simple UserPlugin that defines a single, new flag.
- class armi.tests.test_user_plugins.UserPluginBadDefinesSettings(*args, **kwargs)[source]
Bases:
UserPlugin
This is invalid/bad because it implements defineSettings().
- class armi.tests.test_user_plugins.UserPluginBadDefineParameterRenames(*args, **kwargs)[source]
Bases:
UserPlugin
This is invalid/bad because it implements defineParameterRenames().
- class armi.tests.test_user_plugins.UserPluginOnProcessCoreLoading(*args, **kwargs)[source]
Bases:
UserPlugin
This plugin flex-tests the onProcessCoreLoading() hook, and arbitrarily adds “1” to the height of every block, after the DB is loaded.
- class armi.tests.test_user_plugins.UpInterface(r, cs)[source]
Bases:
Interface
A mostly meaningless little test interface, just to prove that we can affect the reactor state from an interface inside a UserPlugin.
Construct an interface.
The
r
andcs
arguments are required, but may beNone
, where appropriate for the specificInterface
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
- class armi.tests.test_user_plugins.UserPluginWithInterface(*args, **kwargs)[source]
Bases:
UserPlugin
A little test UserPlugin, just to show how to add an Interface through a UserPlugin.
- class armi.tests.test_user_plugins.TestUserPlugins(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_userPluginOnProcessCoreLoading()[source]
Test that a UserPlugin can affect the Reactor state, by implementing onProcessCoreLoading() to arbitrarily increase the height of all the blocks by 1.0.