armi.nuclearDataIO.tests.test_xsLibraries module

Tests for xsLibraries.IsotxsLibrary

armi.nuclearDataIO.tests.test_xsLibraries.copyInputForPmatrxAndGamsio(inpPath)[source]
armi.nuclearDataIO.tests.test_xsLibraries.createTestXSLibraryFiles(cachePath)[source]

This method is used to generate 5 ISOTXS files used during testing.

Notes

It runs a batch file pointing to the MC**2-v3 executable with MC**2-v3 inputs within the repository, instead of placing the larger binary ISOTXS files within the repository.

Also, the _CREATE_ERROR module attribute is used to track whether we have already tried to generate ISOTXS files. Basically, this method can (and should) be called in the setUp/setUpClass of any test that uses the generated ISOTXS files. Therefore, it is possible that for some reason the ISOTXS generation fails, and it would not be worth the time to continually try to recreate the ISOTXS files for each test that uses them, instead just raise the error that occurred the first time.

class armi.nuclearDataIO.tests.test_xsLibraries.TempFileMixin[source]

Bases: object

really a test case

property testFileName
class armi.nuclearDataIO.tests.test_xsLibraries.TestXSLibrary(methodName='runTest')[source]

Bases: unittest.case.TestCase, armi.nuclearDataIO.tests.test_xsLibraries.TempFileMixin

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_canPickleAndUnpickleISOTXS()[source]
test_canPickleAndUnpickleGAMISO()[source]
test_canPickleAndUnpicklePMATRX()[source]
test_compareWorks()[source]
test_compareDifferentComponentsOfAnXSLibrary()[source]
test_mergeFailsWithNonIsotxsFiles()[source]
test_isotxsLibraryAttributes()[source]
test_gamisoLibraryAttributes()[source]
test_pmatrxLibraryAttributes()[source]
test_mergeXSLibrariesWithDifferentDataWorks()[source]
test_canWriteIsotxsFromCombinedXSLibrary()[source]
test_canWriteGamisoFromCombinedXSLibrary()[source]
test_canWritePmatrxFromCombinedXSLibrary()[source]
class armi.nuclearDataIO.tests.test_xsLibraries.Test_GetISOTXSFilesInWorkingDirectory(methodName='runTest')[source]

Bases: unittest.case.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_getISOTXSFilesWithoutLibrarySuffix()[source]
test_getISOTXSFilesWithLibrarySuffix()[source]
assert_contains_only(container, shouldBeThere, shouldNotBeThere)[source]

Utility method for saying what things contain

This could just check the contents and the length, but the error produced when you pass shouldNotBeThere is much nicer.

class armi.nuclearDataIO.tests.test_xsLibraries.Pmatrx_merge_Tests(methodName='runTest')[source]

Bases: armi.nuclearDataIO.tests.test_xsLibraries.TestXSlibraryMerging

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.

getErrorType()[source]
getReadFunc()[source]
getWriteFunc()[source]
getLibAAPath()[source]
getLibABPath()[source]
getLibAA_ABPath()[source]
getLibLumpedPath()[source]
test_canRemoveIsotopes()[source]
test_cannotMergeXSLibsWithDifferentGammaGroupStructures()[source]
class armi.nuclearDataIO.tests.test_xsLibraries.Isotxs_merge_Tests(methodName='runTest')[source]

Bases: armi.nuclearDataIO.tests.test_xsLibraries.TestXSlibraryMerging

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.

getErrorType()[source]
getReadFunc()[source]
getWriteFunc()[source]
getLibAAPath()[source]
getLibABPath()[source]
getLibAA_ABPath()[source]
getLibLumpedPath()[source]
class armi.nuclearDataIO.tests.test_xsLibraries.Gamiso_merge_Tests(methodName='runTest')[source]

Bases: armi.nuclearDataIO.tests.test_xsLibraries.TestXSlibraryMerging

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.

getErrorType()[source]
getReadFunc()[source]
getWriteFunc()[source]
getLibAAPath()[source]
getLibABPath()[source]
getLibAA_ABPath()[source]
getLibLumpedPath()[source]
class armi.nuclearDataIO.tests.test_xsLibraries.Combined_merge_Tests(methodName='runTest')[source]

Bases: unittest.case.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_mergeAllXSLibFiles()[source]