armi.bookkeeping.db.tests.test_database module
Tests for the Database class.
- class armi.bookkeeping.db.tests.test_database.TestDatabase(methodName='runTest')[source]
Bases:
TestCaseTests 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.
- test_fullCoreOnDbLoad()[source]
Test we can expand a reactor to full core when loading from DB via settings.
- class armi.bookkeeping.db.tests.test_database.TestDatabaseSmaller(methodName='runTest')[source]
Bases:
TestCaseTests 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.
- test_getH5File()[source]
Get the h5 file for the database, because that file format is language-agnostic.
- test_replaceNones()[source]
Super basic test that we handle Nones correctly in database read/writes.
- test_grabLocalCommitHash()[source]
Test of static method to grab a local commit hash with ARMI version.
- class armi.bookkeeping.db.tests.test_database.TestWriteReadDatabase(methodName='runTest')[source]
Bases:
TestCaseRound-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'
- class armi.bookkeeping.db.tests.test_database.TestSimplestDatabaseItems(methodName='runTest')[source]
Bases:
TestCaseThe tests here are simple, direct tests of Database, that don’t need a DatabaseInterface or 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.
- class armi.bookkeeping.db.tests.test_database.TestStaticDatabaseItems(methodName='runTest')[source]
Bases:
TestCaseCreate 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.bookkeeping.db.tests.test_database.TestDbRoundTripMatMods(methodName='runTest')[source]
Bases:
TestCaseShow that, before and after DB load, the mass fractions of materials with material modifications in the blueprints are the same.
Further, we want to check that the number densities of of materials with modifications (heavy metals, in this case), are the same before and after DB load, because they are calculated based on the modified materials during assembly construction.
So, in this one block reactor, after DB load, the height of the block/assembly should not change. The number densities of fuels should not change, and the mass fractions inside the fuels materials should not change.
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_byBlock()[source]
Show that the mass fractions of “by block” material modifications are correct after DB load.
- test_byComponent()[source]
Show that the mass fractions of “by component” material modifications are correct after DB load.