armi.bookkeeping.db.tests.test_database3 module

Tests for the Database class.

class armi.bookkeeping.db.tests.test_database3.TestDatabase(methodName='runTest')[source]

Bases: TestCase

Tests for the Database class that require a large, complicated reactor.

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.

makeShuffleHistory()[source]

Walk the reactor through a few time steps with some shuffling.

test_load()[source]

Load a reactor at different time steps, from the database.

test_loadSortSetting()[source]
test_history()[source]
class armi.bookkeeping.db.tests.test_database3.TestDatabaseSmaller(methodName='runTest')[source]

Bases: TestCase

Tests for the Database class, that can use a smaller test reactor.

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.

makeHistory()[source]

Walk the reactor through a few time steps and write them to the db.

test_loadOperator()[source]
test_writeToDB()[source]

Test writing to the database.

test_getH5File()[source]

Get the h5 file for the database, because that file format is language-agnostic.

test_auxData()[source]
test_replaceNones()[source]

Super basic test that we handle Nones correctly in database read/writes.

test_mergeHistory()[source]
test_splitDatabase()[source]
test_grabLocalCommitHash()[source]

Test of static method to grab a local commit hash with ARMI version.

test_fileName()[source]
test_readInputsFromDB()[source]

Test that we can read inputs from the database.

test_deleting()[source]
test_open()[source]
test_loadCS()[source]
test_loadBlueprints()[source]
test_prepRestartRun()[source]

This test is based on the armiRun.yaml case that is loaded during the setUp above. In that cs, reloadDBName is set to ‘reloadingDB.h5’, startCycle = 1, and startNode = 2. The nonexistent ‘reloadingDB.h5’ must first be created here for this test.

test_computeParents()[source]
class armi.bookkeeping.db.tests.test_database3.TestWriteReadDatabase(methodName='runTest')[source]

Bases: TestCase

Round-trip tests that we can write/read data to and from a Database.

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.

SMALL_YAML = '!include refOneBlockReactor.yaml\nsystems:\n    core:\n        grid name: core\n        origin:\n            x: 0.0\n            y: 0.0\n            z: 0.0\n    sfp:\n        type: sfp\n        grid name: sfp\n        origin:\n            x: 1000.0\n            y: 1000.0\n            z: 1000.0\n    evst:\n        type: excore\n        grid name: evst\n        origin:\n            x: 2000.0\n            y: 2000.0\n            z: 2000.0\ngrids:\n    core:\n      geom: hex_corners_up\n      lattice map: |\n        IC\n      symmetry: full\n    evst:\n      lattice pitch:\n          x: 32.0\n          y: 32.0\n      geom: hex\n      symmetry: full\n'
test_readWriteRoundTrip()[source]

Test DB some round tripping, writing some data to a DB, then reading from it.

In particular, we test some parameters on the reactor, core, and blocks. And we move an assembly from the core to an EVST between timenodes, and test that worked.

test_badData()[source]