armi.cases.tests.test_cases module

Unit tests for Case and CaseSuite objects.

class armi.cases.tests.test_cases.TestArmiCase(methodName='runTest')[source]

Bases: TestCase

Class to tests armi.cases.Case methods.

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

Ensure that the summarizeDesign method runs.

Any assertions are bonus.

test_independentVariables()[source]

Ensure that independentVariables added to a case move with it.

test_setUpTaskDependence()[source]
test_getCoverageRcFile()[source]
test_startCoverage()[source]
test_endCoverage()[source]
test_startProfiling()[source]
test_endProfiling()[source]
test_run()[source]
test_clone()[source]
class armi.cases.tests.test_cases.TestCaseSuiteDependencies(methodName='runTest')[source]

Bases: TestCase

CaseSuite tests.

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

If you pass an invalid path, the clone can’t happen, but it won’t do any damage either.

test_dependenciesWithObscurePaths()[source]

Test directory dependence.

Tip

This should be updated to use the Python pathlib so the tests can work in both Linux and Windows identically.

test_dependencyFromDBName()[source]
test_dependencyFromExplictRepeatShuffles()[source]
test_explicitDependency()[source]
test_titleSetterGetter()[source]
test_buildCommand()[source]
class armi.cases.tests.test_cases.TestExtraInputWriting(methodName='runTest')[source]

Bases: TestCase

Make sure extra inputs from interfaces are written.

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_writeInput()[source]
class armi.cases.tests.test_cases.MultiFilesInterfaces(r, cs)[source]

Bases: Interface

A little test interface that adds a setting that we need to test copyInterfaceInputs with multiple files.

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] = 'MultiFilesInterfaces'

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

static specifyInputs(cs)[source]
class armi.cases.tests.test_cases.TestPluginForCopyInterfacesMultipleFiles[source]

Bases: ArmiPlugin

static defineSettings()[source]
static exposeInterfaces(cs)[source]
class armi.cases.tests.test_cases.TestCopyInterfaceInputs(methodName='runTest')[source]

Bases: TestCase

Ensure file path is found and updated properly.

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

Test the helper function for copyInterfaceInputs.

test_copyInterfaceInputs_singleFile()[source]
test_copyInterfaceInputs_nonFilePath()[source]
test_copyInterfaceInputs_multipleFiles()[source]
test_copyInterfaceInputs_wildcardFile()[source]
test_copyInterfaceInputs_relPath()[source]
test_copyInterfaceInputs_absPath()[source]