Пример #1
0
 def setup_class(cls):
     filename = testData_loc + 'test_mat.xml'
     NSfile = testData_loc + 'test_mat_nonsource.xml'
     noXsecFile = testData_loc + 'test_mat_no_xsec.xml'
     zeroXsecFile = testData_loc + 'test_mat_zero_xsec.xml'
     threeGFile = testData_loc + 'test_mat_3grps.xml'
     cls.testmat = _mat(filename, grps = 2)
     cls.testmatT = _mat(filename, grps = 2, tr_scatt=True)
     cls.testNSmat = _mat(NSfile, grps = 2)
     cls.testNXmat = _mat(noXsecFile, grps = 2)
     cls.testZXmat = _mat(zeroXsecFile, grps = 2)
     cls.test3gmat = _mat(threeGFile, grps = 3)
Пример #2
0
 def test_xsec_pos(self):
     """ Negative cross sections should return a Runtime Error """
     filename = testData_loc + 'test_neg_xsec.xml'
     badMat = _mat(filename, grps = 2)
Пример #3
0
 def test_xsec_sizes(self):
     """ All cross section arrays should be the same size. """
     filename = testData_loc + 'test_bad_xsec.xml'
     badMat = _mat(filename, grps = 2)
Пример #4
0
 def test_no_id(self):
     """ Uploading a material with no id should return an assertion error. """
     filename = testData_loc + 'test_no_id.xml'
     badMat = _mat(filename, grps = 2)
Пример #5
0
 def test_mat_bad_filename(self):
     """ Reading a bad filename should return an assertion error. """
     filename = testData_loc + 'badname.xml'
     badMat = _mat(filename, grps = 2)
Пример #6
0
 def test_mat_bad_structure(self):
     """ Specifying a group structure not in the material file should return
     a Key error """
     filename = testData_loc + 'test_mat.xml'
     badMat = _mat(filename, grps = 3)
Пример #7
0
 def test_mat_bad_g_thermal(self):
     """ A value of g_thermal greater than n_grps should return
     a runtime error """
     filename = testData_loc + 'test_bad_g_thermal.xml'
     badmat = _mat(filename, grps = 2)
Пример #8
0
 def test_mat_nonint_g_thermal(self):
     """ A non integer value of g_thermal should return a runtime
     error"""
     filename = testData_loc + 'test_bad_g_thermal_float.xml'
     badmat = _mat(filename, grps = 2)