armi.bookkeeping.db.tests.test_databaseInterface module

Tests of the Database Interface.

armi.bookkeeping.db.tests.test_databaseInterface.getSimpleDBOperator(cs)[source]

Return a very simple operator that covers most of the database interactions.

Notes

This reactor has only 1 assembly with 1 type of block. It’s used to make the db unit tests run very quickly.

class armi.bookkeeping.db.tests.test_databaseInterface.MockInterface(r, cs, action=None)[source]

Bases: Interface

name: Optional[str] = 'mockInterface'

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

interactEveryNode(cycle, node)[source]
class armi.bookkeeping.db.tests.test_databaseInterface.TestDatabaseInterface(methodName='runTest')[source]

Bases: TestCase

Tests for the DatabaseInterface class.

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_interactBOL()[source]
test_distributable()[source]
test_demonstrateWritingInteractions()[source]

Test what nodes are written to the database during the interaction calls.

test_interactEveryNodeReturnTightCoupling()[source]

Test that the DB is NOT written to if cs[“tightCoupling”] = True.

test_timeNodeLoop_tightCoupling()[source]

Test that database is written out after the coupling loop has completed.

class armi.bookkeeping.db.tests.test_databaseInterface.TestDatabaseWriter(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_writeSystemAttributes()[source]

Test the writeSystemAttributes method.

test_metaData_endSuccessfully()[source]

Test databases have the correct metadata in them.

test_metaDataEndFail()[source]
test_getHistory()[source]
test_getHistoryByLocation()[source]
class armi.bookkeeping.db.tests.test_databaseInterface.TestDatabaseReading(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_growToFullCore()[source]
test_growToFullCoreWithCS()[source]
test_growToFullCoreFromFactory()[source]
test_growToFullCoreFromFactoryWithCS()[source]
test_readWritten()[source]
test_readWithoutInputs()[source]
test_variousTypesWork()[source]
test_timesteps()[source]
class armi.bookkeeping.db.tests.test_databaseInterface.TestBadName(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_badDBName()[source]
class armi.bookkeeping.db.tests.test_databaseInterface.TestStandardFollowOn(methodName='runTest')[source]

Bases: TestCase

Tests related to doing restart runs (loading from DB with Standard 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.

test_standardRestart()[source]