text: """Test the xsplot reader."""
  import unittest
  from numpy import ndarray, array
  
  from numpy.testing import assert_array_equal
  
  from serpentTools.parsers.xsplot import XSPlotReader
  from serpentTools.data import getFile
  
  
  def findDiff(d1, d2, path=""):
      """ Diffs two dictionaries with nested structure
      """
      noDiff = True
      for k in d1.keys():
          if k not in d2.keys():
              print(path, ":")
              print(k + " as key not in d2", "\n")
              noDiff = False
          else:
              if type(d1[k]) is dict:
                  if path == "":
                      path = k
                  else:
                      path = path + "->" + k
                  findDiff(d1[k], d2[k], path)
              else:
                  # if it's a numpy array, special treatment
                  if isinstance(d1[k], ndarray) and isinstance(d2[k], ndarray):
                      assert_array_equal(d1[k], d2[k])
                  elif d1[k] != d2[k]:
                      print(path, ":")
                      print(" - ", k, " : ", d1[k])
                      print(" + ", k, " : ", d2[k])
                      noDiff = False
      return noDiff
  
  
  class XSPlotTester(unittest.TestCase):
      """
      Class to test the xsplot reader.
  
      Cases:
  
          1. A file that has a "fissile", and "be" material.
              plut_xs0.m
      """
  
      @classmethod
      def setUpClass(cls):
          cls.file = getFile('plut_xs0.m')
          cls.reader = XSPlotReader(cls.file)
          cls.reader.read()
  
      def test1_allXS(self):
          """Check XS read correctly for case 1"""
  
          # Form expected results dictionary
          expected = {
              'i4009_03c': {
                  'MT': [1, 101, 2, 102, 107, 16, 105, 103, 104],
                  'MTdescrip':
                  [' Total', ' Sum of absorption', ' elastic scattering',
                   ' (n,gamma)', ' (n,alpha)', ' (n,2n)', ' (n,t)', ' (n,p)',
                   ' (n,d)'],
                  'hasNuData': False,
                  'isIso': True,
                  'metadata': {
                      'egrid': array(
                          [1.00000e-08, 1.03891e-07, 1.07934e-06,
                           1.12135e-05, 1.16498e-04, 1.21032e-03,
                           1.25742e-02, 1.30635e-01, 1.35719e+00,
                           1.41000e+01]),
                      'majorant_xs': array(
                          [78.4253, 36.1666, 2.54417, 13.0654,
                           4.27811, 0.822536, 0.781066, 0.598564,
                           0.34175, 0.293887]),
                  },
                  'name': 'i4009_03c',
                  'xsdata': array(
                      [[7.01317e+00, 1.37306e-02, 6.99944e+00, 1.37306e-02,
                        0.00000e+00, 0.00000e+00, 0.00000e+00, 0.00000e+00,
                        0.00000e+00],
                       [6.21359e+00, 4.26165e-03, 6.20933e+00, 4.26165e-03,
                        0.00000e+00, 0.00000e+00, 0.00000e+00, 0.00000e+00,
                        0.00000e+00],
                       [6.13630e+00, 1.32596e-03, 6.13498e+00, 1.32596e-03,
                        0.00000e+00, 0.00000e+00, 0.00000e+00, 0.00000e+00,
                        0.00000e+00],
                       [6.13005e+00, 4.12452e-04, 6.12964e+00, 4.12452e-04,
                        0.00000e+00, 0.00000e+00, 0.00000e+00, 0.00000e+00,
                        0.00000e+00],
                       [6.46230e+00, 1.35153e-04, 6.46217e+00, 1.35153e-04,
                        0.00000e+00, 0.00000e+00, 0.00000e+00, 0.00000e+00,
                        0.00000e+00],
                       [6.44962e+00, 1.00003e-04, 6.44952e+00, 1.00003e-04,
                        0.00000e+00, 0.00000e+00, 0.00000e+00, 0.00000e+00,
                        0.00000e+00],
                       [6.16328e+00, 1.00000e-04, 6.16318e+00, 1.00000e-04,
                        0.00000e+00, 0.00000e+00, 0.00000e+00, 0.00000e+00,
                        0.00000e+00],
                       [4.84201e+00, 1.00000e-04, 4.84191e+00, 1.00000e-04,
                        0.00000e+00, 0.00000e+00, 0.00000e+00, 0.00000e+00,
                        0.00000e+00],
                       [2.44201e+00, 9.37932e-03, 2.43263e+00, 1.00000e-04,
                        9.27932e-03, 0.00000e+00, 0.00000e+00, 0.00000e+00,
                        0.00000e+00],
                       [1.52201e+00, 3.13775e-02, 1.00615e+00, 1.00000e-04,
                        1.04000e-02, 4.84483e-01, 2.08775e-02, 0.00000e+00,
                        0.00000e+00]]),
              },
              'i7014_03c': {
                  'MT': [1, 101, 2, 102, 103, 107, 51, 52, 105, 53, 54,
                         104, 55, 56, 57, 58, 59, 60, 61, 62, 63, 108,
                         64, 65, 66, 16, 67, 68, 69, 70, 71, 72, 73,
                         74, 75, 76, 77],
                  'MTdescrip': [
                      ' Total',
                      ' Sum of absorption',
                      ' elastic scattering',
                      ' (n,gamma)',
                      ' (n,p)',
                      ' (n,alpha)',
                      ' inelastic scatt. to 1. excited state',
                      ' inelastic scatt. to 2. excited state',
                      ' (n,t)',
                      ' inelastic scatt. to 3. excited state',
                      ' inelastic scatt. to 4. excited state',
                      ' (n,d)',
                      ' inelastic scatt. to 5. excited state',
                      ' inelastic scatt. to 6. excited state',
                      ' inelastic scatt. to 7. excited state',
                      ' inelastic scatt. to 8. excited state',
                      ' inelastic scatt. to 9. excited state',
                      ' inelastic scatt. to 10. excited state',
                      ' inelastic scatt. to 11. excited state',
                      ' inelastic scatt. to 12. excited state',
                      ' inelastic scatt. to 13. excited state',
                      ' (n,2alpha)',
                      ' inelastic scatt. to 14. excited state',
                      ' inelastic scatt. to 15. excited state',
                      ' inelastic scatt. to 16. excited state',
                      ' (n,2n)',
                      ' inelastic scatt. to 17. excited state',
                      ' inelastic scatt. to 18. excited state',
                      ' inelastic scatt. to 19. excited state',
                      ' inelastic scatt. to 20. excited state',
                      ' inelastic scatt. to 21. excited state',
                      ' inelastic scatt. to 22. excited state',
                      ' inelastic scatt. to 23. excited state',
                      ' inelastic scatt. to 24. excited state',
                      ' inelastic scatt. to 25. excited state',
                      ' inelastic scatt. to 26. excited state',
                      ' inelastic scatt. to 27. excited state',
                  ],
                  'hasNuData': False,
                  'isIso': True,
                  'metadata': {
                      'egrid': array(
                          [1.00000e-08, 1.03891e-07, 1.07934e-06,
                           1.12135e-05, 1.16498e-04, 1.21032e-03,
                           1.25742e-02, 1.30635e-01, 1.35719e+00,
                           1.41000e+01]),
                      'majorant_xs': array(
                          [78.4253, 36.1666, 2.54417, 13.0654, 4.27811,
                           0.822536, 0.781066, 0.598564, 0.34175,
                           0.293887]),
                  },
                  'name': 'i7014_03c',
                  'xsdata': array(
                          [[1.38617e+01, 3.02755e+00, 1.08341e+01,
                            1.19369e-01, 2.90818e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00],
                           [1.09408e+01, 9.40357e-01, 1.00005e+01,
                            3.70450e-02, 9.03312e-01, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00],
                           [1.02124e+01, 2.92686e-01, 9.91971e+00,
                            1.15140e-02, 2.81172e-01, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00],
                           [1.00002e+01, 9.08022e-02, 9.90940e+00,
                            3.57470e-03, 8.72275e-02, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00],
                           [9.91031e+00, 2.81012e-02, 9.88221e+00,
                            1.10873e-03, 2.69924e-02, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00],
                           [9.64043e+00, 8.59925e-03, 9.63183e+00,
                            3.43616e-04, 8.25563e-03, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00],
                           [7.84337e+00, 2.51950e-03, 7.84085e+00,
                            1.06678e-04, 2.41282e-03, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00],
                           [4.07192e+00, 1.36821e-03, 4.07056e+00,
                            3.32491e-05, 1.33496e-03, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00],
                           [3.12559e+00, 2.28369e-01, 2.89722e+00,
                            5.43897e-05, 1.95266e-01, 3.30488e-02,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00],
                           [1.57063e+00, 2.26795e-01, 9.69740e-01,
                            1.67954e-05, 4.38910e-02, 8.05159e-02,
                            7.70264e-03, 1.91396e-02, 2.85733e-02,
                            6.99251e-03, 3.07668e-02, 4.20269e-02,
                            1.70461e-02, 2.51740e-02, 4.58102e-03,
                            1.43599e-02, 2.45831e-02, 5.84575e-03,
                            2.32134e-03, 1.06612e-02, 2.64923e-02,
                            3.17714e-02, 2.83496e-02, 1.86691e-02,
                            2.55665e-02, 6.49650e-03, 1.89994e-02,
                            2.16818e-02, 2.38091e-02, 1.46684e-02,
                            2.01925e-02, 0.00000e+00, 0.00000e+00,
                            0.00000e+00, 0.00000e+00, 0.00000e+00,
                            0.00000e+00],
                           ]),
              },
              'i8016_03c': {
                  'MT': [
                      1, 101, 2, 102, 107, 51, 52, 53, 54, 22, 55,
                      3, 104, 56, 57, 28, 108, 105, 23, 16],
                  'MTdescrip': [
                      ' Total', ' Sum of absorption',
                      ' elastic scattering', ' (n,gamma)',
                      ' (n,alpha)',
                      ' inelastic scatt. to 1. excited state',
                      ' inelastic scatt. to 2. excited state',
                      ' inelastic scatt. to 3. excited state',
                      ' inelastic scatt. to 4. excited state',
                      ' (n,nalpha)',
                      ' inelastic scatt. to 5. excited state',
                      ' inelastic scattering to continuum', ' (n,p)',
                      ' (n,d)',
                      ' inelastic scatt. to 6. excited state',
                      ' inelastic scatt. to 7. excited state',
                      ' (n,np)', ' (n,2alpha)', ' (n,t)',
                      ' (n,n3alpha)',
                      ' (n,2n)',
                  ],
                  'hasNuData': False,
                  'isIso': True,
                  'metadata': {
                      'egrid': array(
                          [1.00000e-08, 1.03891e-07, 1.07934e-06,
                           1.12135e-05, 1.16498e-04, 1.21032e-03,
                           1.25742e-02, 1.30635e-01, 1.35719e+00,
                           1.41000e+01]),
                      'majorant_xs': array(
                          [78.4253, 36.1666, 2.54417, 13.0654,
                           4.27811, 0.822536, 0.781066, 0.598564,
                           0.34175, 0.293887]),
                  },
                  'name': 'i8016_03c',
                  'xsdata': array([
                      [4.16597e+00, 3.02389e-04, 4.16567e+00,
                       3.02389e-04, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00],
                      [3.88237e+00, 9.39855e-05, 3.88228e+00,
                       9.39855e-05, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00],
                      [3.85502e+00, 2.95324e-05, 3.85499e+00,
                       2.95324e-05, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00],
                      [3.85230e+00, 9.22131e-06, 3.85229e+00,
                       9.22131e-06, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00],
                      [3.85180e+00, 2.87642e-06, 3.85179e+00,
                       2.87642e-06, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00],
                      [3.84938e+00, 8.70862e-07, 3.84938e+00,
                       8.70862e-07, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00],
                      [3.82434e+00, 2.69615e-07, 3.82434e+00,
                       2.69615e-07, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00],
                      [3.58676e+00, 8.38008e-08, 3.58676e+00,
                       8.38008e-08, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00],
                      [3.19656e+00, 2.59416e-08, 3.19656e+00,
                       2.59416e-08, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00],
                      [1.59300e+00, 2.04861e-01, 9.44657e-01,
                       8.04830e-09, 1.44515e-01, 2.49325e-03,
                       9.52848e-02, 2.32792e-02, 4.96751e-02,
                       1.29292e-01, 4.11369e-02, 6.43428e-02,
                       4.27233e-02, 1.76227e-02, 4.75147e-03,
                       3.18986e-02, 1.32621e-03, 7.90475e-14,
                       0.00000e+00, 0.00000e+00, 0.00000e+00]]),
              },
              'i94239_03c': {
                  'MT': [1, 101, 2, 18, 102, 51, 52, 53, 54, 55, 56,
                         57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
                         68, 91, 69, 70, 71, 72, 73, 74, 75, 76, 77,
                         78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
                         89, 90, 16, 17, 37],
                  'MTdescrip': [
                      ' Total', ' Sum of absorption',
                      ' elastic scattering', ' total fission',
                      ' (n,gamma)',
                      ' inelastic scatt. to 1. excited state',
                      ' inelastic scatt. to 2. excited state',
                      ' inelastic scatt. to 3. excited state',
                      ' inelastic scatt. to 4. excited state',
                      ' inelastic scatt. to 5. excited state',
                      ' inelastic scatt. to 6. excited state',
                      ' inelastic scatt. to 7. excited state',
                      ' inelastic scatt. to 8. excited state',
                      ' inelastic scatt. to 9. excited state',
                      ' inelastic scatt. to 10. excited state',
                      ' inelastic scatt. to 11. excited state',
                      ' inelastic scatt. to 12. excited state',
                      ' inelastic scatt. to 13. excited state',
                      ' inelastic scatt. to 14. excited state',
                      ' inelastic scatt. to 15. excited state',
                      ' inelastic scatt. to 16. excited state',
                      ' inelastic scatt. to 17. excited state',
                      ' inelastic scatt. to 18. excited state',
                      ' inelastic scattering to continuum',
                      ' inelastic scatt. to 19. excited state',
                      ' inelastic scatt. to 20. excited state',
                      ' inelastic scatt. to 21. excited state',
                      ' inelastic scatt. to 22. excited state',
                      ' inelastic scatt. to 23. excited state',
                      ' inelastic scatt. to 24. excited state',
                      ' inelastic scatt. to 25. excited state',
                      ' inelastic scatt. to 26. excited state',
                      ' inelastic scatt. to 27. excited state',
                      ' inelastic scatt. to 28. excited state',
                      ' inelastic scatt. to 29. excited state',
                      ' inelastic scatt. to 30. excited state',
                      ' inelastic scatt. to 31. excited state',
                      ' inelastic scatt. to 32. excited state',
                      ' inelastic scatt. to 33. excited state',
                      ' inelastic scatt. to 34. excited state',
                      ' inelastic scatt. to 35. excited state',
                      ' inelastic scatt. to 36. excited state',
                      ' inelastic scatt. to 37. excited state',
                      ' inelastic scatt. to 38. excited state',
                      ' inelastic scatt. to 39. excited state',
                      ' inelastic scatt. to 40. excited state',
                      ' (n,2n)', ' (n,3n)', ' (n,4n)'],
                  'hasNuData': True,
                  'isIso': True,
                  'metadata': {
                      'egrid': array(
                          [1.00000e-08, 1.03891e-07, 1.07934e-06,
                           1.12135e-05, 1.16498e-04, 1.21032e-03,
                           1.25742e-02, 1.30635e-01, 1.35719e+00,
                           1.41000e+01]),
                      'majorant_xs': array(
                          [78.4253, 36.1666, 2.54417, 13.0654,
                           4.27811, 0.822536, 0.781066, 0.598564,
                           0.34175, 0.293887]),
                  },
                  'name': 'i94239_03c',
                  'nuData': array([
                      [2.88002e+00, 6.45000e-03],
                      [2.87172e+00, 6.45000e-03],
                      [2.87765e+00, 6.45000e-03],
                      [2.86352e+00, 6.45000e-03],
                      [2.88894e+00, 6.45000e-03],
                      [2.89426e+00, 6.45000e-03],
                      [2.89462e+00, 6.45000e-03],
                      [2.89965e+00, 6.45000e-03],
                      [3.07263e+00, 6.45000e-03],
                      [4.95008e+00, 4.30000e-03]]),
                  'xsdata': array([
                      [1.56851e+03, 3.93396e+02, 8.09899e+00,
                       1.16701e+03, 3.93396e+02, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00],
                      [7.23332e+02, 2.40900e+02, 7.39286e+00,
                       4.75040e+02, 2.40900e+02, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00],
                      [5.08834e+01, 8.21117e+00, 1.01218e+01,
                       3.25505e+01, 8.21117e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00],
                      [2.61308e+02, 4.03196e+01, 1.43077e+01,
                       2.06681e+02, 4.03196e+01, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00],
                      [8.55622e+01, 8.68243e+00, 1.44334e+01,
                       6.24464e+01, 8.68243e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00],
                      [1.64507e+01, 7.02811e-02, 1.07412e+01,
                       5.63926e+00, 7.02811e-02, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00],
                      [1.56213e+01, 9.54576e-01, 1.24676e+01,
                       1.87707e+00, 9.54576e-01, 3.22106e-01,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00],
                      [1.16702e+01, 2.16107e-01, 9.16040e+00,
                       1.50330e+00, 2.16107e-01, 5.60165e-01,
                       1.87396e-01, 4.28144e-02, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00],
                      [6.83499e+00, 1.54422e-02, 3.27109e+00,
                       1.90259e+00, 1.54422e-02, 2.42878e-01,
                       3.32580e-01, 6.42734e-02, 5.34598e-02,
                       1.54417e-02, 3.64743e-02, 9.46685e-03,
                       2.59964e-02, 3.56391e-02, 2.39210e-02,
                       1.73138e-02, 3.30727e-02, 3.53117e-02,
                       2.94263e-02, 3.16646e-02, 1.96520e-02,
                       1.96853e-02, 3.84797e-03, 5.96636e-01,
                       2.59670e-03, 7.08134e-04, 2.19030e-03,
                       1.08157e-03, 1.25509e-02, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00],
                      [5.87774e+00, 2.27284e-03, 2.72848e+00,
                       2.41217e+00, 2.27284e-03, 9.49498e-02,
                       1.42231e-01, 1.91357e-02, 2.38983e-02,
                       6.89030e-03, 0.00000e+00, 8.01346e-03,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       0.00000e+00, 0.00000e+00, 0.00000e+00,
                       4.33261e-03, 0.00000e+00, 5.77543e-03,
                       0.00000e+00, 0.00000e+00, 7.03469e-02,
                       1.68538e-03, 5.14204e-03, 2.52079e-03,
                       6.96677e-03, 6.93165e-03, 1.49274e-02,
                       6.96715e-03, 7.46602e-03, 5.97098e-03,
                       7.96117e-03, 1.07498e-02, 1.34154e-02,
                       3.67423e-04, 4.65750e-03, 5.32589e-03,
                       4.56426e-03, 4.43752e-03, 1.66154e-03,
                       1.81176e-03, 1.87937e-03, 1.40625e-03,
                       1.56047e-03, 2.24766e-01, 1.60937e-02,
                       0.00000e+00]]),
              },
              'mbe': {
                  'MT': [-1, -3, -2, -16],
                  'MTdescrip': [
                      'Macro total',
                      'Macro total elastic scatter',
                      'Macro total capture',
                      'Macro total scattering neutron production'],
                  'hasNuData': False,
                  'isIso': False,
                  'metadata': {
                      'egrid': array(
                          [1.00000e-08, 1.03891e-07, 1.07934e-06,
                           1.12135e-05, 1.16498e-04, 1.21032e-03,
                           1.25742e-02, 1.30635e-01, 1.35719e+00,
                           1.41000e+01]),
                      'majorant_xs': array(
                          [78.4253, 36.1666, 2.54417, 13.0654,
                           4.27811, 0.822536, 0.781066, 0.598564,
                           0.34175, 0.293887]),
                  },
                  'name': 'mbe',
                  'xsdata': array([
                      [8.66961e-01, 8.65263e-01, 1.69736e-03, 0.00000e+00],
                      [7.68117e-01, 7.67590e-01, 5.26821e-04, 0.00000e+00],
                      [7.58563e-01, 7.58399e-01, 1.63913e-04, 0.00000e+00],
                      [7.57790e-01, 7.57739e-01, 5.09869e-05, 0.00000e+00],
                      [7.98862e-01, 7.98846e-01, 1.67075e-05, 0.00000e+00],
                      [7.97295e-01, 7.97283e-01, 1.23622e-05, 0.00000e+00],
                      [7.61898e-01, 7.61885e-01, 1.23619e-05, 0.00000e+00],
                      [5.98564e-01, 5.98552e-01, 1.23619e-05, 0.00000e+00],
                      [3.01878e-01, 3.00719e-01, 1.15946e-03, 0.00000e+00],
                      [1.88149e-01, 1.24379e-01, 3.87885e-03, 5.98912e-02]]),
              },
              'mfissile': {
                  'MT': [-1, -3, -2, -6, -7, -16],
                  'MTdescrip': [
                      'Macro total', 'Macro total elastic scatter',
                      'Macro total capture', 'Macro total fission',
                      'Macro total fission neutron production',
                      'Macro total scattering neutron production'],
                  'hasNuData': False,
                  'isIso': False,
                  'metadata': {
                      'egrid': array(
                          [1.00000e-08, 1.03891e-07, 1.07934e-06,
                           1.12135e-05, 1.16498e-04, 1.21032e-03,
                           1.25742e-02, 1.30635e-01, 1.35719e+00,
                           1.41000e+01]),
                      'majorant_xs': array(
                          [78.4253, 36.1666, 2.54417, 13.0654,
                           4.27811, 0.822536, 0.781066, 0.598564,
                           0.34175, 0.293887]),
                  },
                  'name': 'mfissile',
                  'xsdata': array([
                      [7.84253e+01, 4.04950e-01, 1.96698e+01,
                       5.83505e+01, 1.67674e+02, 0.00000e+00],
                      [3.61666e+01, 3.69643e-01, 1.20450e+01,
                       2.37520e+01, 6.80558e+01, 0.00000e+00],
                      [2.54417e+00, 5.06089e-01, 4.10559e-01,
                       1.62752e+00, 4.67294e+00, 0.00000e+00],
                      [1.30654e+01, 7.15384e-01, 2.01598e+00,
                       1.03340e+01, 2.95250e+01, 0.00000e+00],
                      [4.27811e+00, 7.21668e-01, 4.34122e-01,
                       3.12232e+00, 9.00007e+00, 0.00000e+00],
                      [8.22536e-01, 5.37059e-01, 3.51405e-03,
                       2.81963e-01, 8.14254e-01, 0.00000e+00],
                      [7.81066e-01, 6.23379e-01, 4.77288e-02,
                       9.38536e-02, 2.71066e-01, 0.00000e+00],
                      [5.83509e-01, 4.58020e-01, 1.08053e-02,
                       7.51650e-02, 2.17468e-01, 0.00000e+00],
                      [3.41750e-01, 1.63555e-01, 7.72110e-04,
                       9.51295e-02, 2.91685e-01, 0.00000e+00],
                      [2.93887e-01, 1.36424e-01, 1.13642e-04,
                       1.20609e-01, 5.96505e-01, 1.28477e-02]]),
              },
          }
  
          # newly obtained results:
          gotDict = dict(
              [(xs.name, vars(xs)) for xs in self.reader.xsections.values()])
  
          # added, removed, modified, same = dict_compare(gotDict, expected)
          assert findDiff(gotDict, expected)
  
      def test2_testPrintMT(self):
          """ Test the printMT method, a real simple text comparison!
          """
          refString = """MT numbers available for mfissile:
  ----------------------------------
  -1  Macro total
  -3  Macro total elastic scatter
  -2  Macro total capture
  -6  Macro total fission
  -7  Macro total fission neutron production
  -16 Macro total scattering neutron production
  """
          actual = self.reader.xsections['mfissile'].showMT(retstring=True)
          self.assertEqual(refString.rstrip(), actual.rstrip())
  