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 running a case.

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

Test the checkInputs() method on a couple of cases.

test_dependenciesWithObscurePaths()[source]

Test directory dependence for strangely-written file paths (escape characters).

test_dependencyFromDBName()[source]
test_dependencyFromExplictRepeatShuffles()[source]
test_explicitDependency()[source]

Test dependencies for case suites.

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

Bases: TestCase

CaseSuite.compare() 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_compareNoDiffs()[source]

As a baseline, this test should always reveal zero diffs.

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.TestPluginWithDuplicateSetting[source]

Bases: ArmiPlugin

static defineSettings()[source]

Define a duplicate setting.

class armi.cases.tests.test_cases.TestPluginForCopyInterfacesMultipleFiles[source]

Bases: ArmiPlugin

static defineSettings()[source]

Define settings for the plugin.

static exposeInterfaces(cs)[source]

A plugin is mostly just a vehicle to add Interfaces to an Application.

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

That that if a plugin attempts to add a duplicate setting, it raises an error.

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