コード例 #1
0
 def setUpClass(cls):
     cls.filePath = os.path.join(TEST_ROOT, 'ref_dep.m')
     cls.processTotal = True
     cls.materials = ['fuel']
     cls.expectedMaterials = set(cls.materials)
     cls.expectedVariables = {'BURNUP', 'ADENS', 'ING_TOX'}
     if cls.processTotal:
         cls.expectedMaterials.add('total')
     with rc as tempRC:
         tempRC['verbosity'] = 'debug'
         tempRC['depletion.processTotal'] = True
         tempRC['depletion.materials'] = ['fuel', ]
         tempRC['depletion.materialVariables'] = [
             'BURNUP', 'ADENS', 'ING_TOX']
         tempRC['depletion.processTotal'] = cls.processTotal
         tempRC['depletion.materials'] = cls.materials
         tempRC['depletion.materialVariables'] = (
             list(cls.expectedVariables)
         )
         cls.reader = DepletionReader(cls.filePath)
     cls.reader.read()
     read(cls.filePath, DepletionReader)
コード例 #2
0
 def setUpClass(cls):
     cls.reader = read(getFile('time_det0.m'), 'det')
     cls.timeDet = cls.reader['FP']
コード例 #3
0
 def setUp(self):
     self.detector = read(SINGLE_TALLY_FILE, 'det').detectors['one']
コード例 #4
0
 def setUpClass(cls):
     cls.reader = read(cls.FILE_PATH, 'det')
     cls.detectors = cls.reader.detectors
コード例 #5
0
 def test_exceptionUnsupportedReader(self):
     """Verify an exception is raised for bad reader string"""
     with self.assertRaises(SerpentToolsException):
         read('dummyFP', 'this won\'t work')
コード例 #6
0
 def test_nonCallableReader(self):
     """
     Verify that an error is raised if the reader is non string nor callable
     """
     with self.assertRaises(AssertionError):
         read('dummyFP', None)