armi.tests.test_mpiFeatures module
Tests for featurest that need MPI, and thus require special testing.
These tests will be generally ignored by pytest if you are trying to run them in an environment without MPI installed.
To run these tests from the commandline, install MPI, mpi4py, and do:
mpiexec -n 2 python -m pytest armi/tests/test_mpiFeatures.py or mpiexec.exe -n 2 python -m pytest armi/tests/test_mpiFeatures.py
- class armi.tests.test_mpiFeatures.FailingInterface1(r, cs)[source]
Bases:
Interface
utility classes to make sure the logging system fails properly.
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_mpiFeatures.FailingInterface2(r, cs)[source]
Bases:
Interface
utility class to make sure the logging system fails properly.
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_mpiFeatures.FailingInterface3(r, cs)[source]
Bases:
Interface
fails on worker operate.
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_mpiFeatures.MockInterface(r, cs)[source]
Bases:
Interface
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_mpiFeatures.MpiOperatorTests(methodName='runTest')[source]
Bases:
TestCase
Testing the MPI parallelization operator.
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.
- class armi.tests.test_mpiFeatures.MpiDistributeStateTests(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_distributeSettings()[source]
Under normal circumstances, we would not test “private” methods; however, distributeState is quite complicated.
- test_distributeReactor()[source]
Under normal circumstances, we would not test “private” methods; however, distributeState is quite complicated.
- class armi.tests.test_mpiFeatures.MpiPathToolsTests(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.
- class armi.tests.test_mpiFeatures.TestContextMpi(methodName='runTest')[source]
Bases:
TestCase
Parallel tests for the Context module.
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.