Commit b908eaf4 authored by Patrick Shriwise's avatar Patrick Shriwise
Browse files

Adding simple test that isotopes are extracted from the XML file correctly

parent 376fc2e1
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
<ISOXML>
  <Multigroup_Cross_Section_Libraries Name="ISOTXS-neutron" NGroup="33">
    <Multigroup_Cross_Section_Library ID="1" Ver="1.0" Generator="INL" TimeCreated="Wed Jul 20 21:02:47 2022" Description="ISOTXS">
      <Tabulation>Tfuel</Tabulation>
      <Tfuel>300</Tfuel>
      <ReferenceGridIndex>1</ReferenceGridIndex>
      <AllReactions>Total Transport Removal Absorption NGamma N2N NAlpha NProton NDeuteron NTriton Fission nuFission kappaFission EnergyDeposition FissionSpectrum NeutronVelocity Scattering</AllReactions>
      <TablewiseReactions/>
      <LibrarywiseReactions/>
      <Table gridIndex="1">
        <Isotope Name="pseudo_REG_A" L="1">
        </Isotope>
        <Isotope Name="pseudo_REG_B" L="1">
        </Isotope>
        <Isotope Name="pseudo_REG_C" Class="Structure" L="1">
        </Isotope>
      </Table>
    </Multigroup_Cross_Section_Library>
  </Multigroup_Cross_Section_Libraries>
</ISOXML>
+8 −0
Original line number Diff line number Diff line
import pytest

from pygriffin.isoxml_reader import parse_isoxml

def test_isoxml_materials():
    exp_materials = ['pseudo_REG_A', 'pseudo_REG_B', 'pseudo_REG_C']
    materials = parse_isoxml('./test_files/isoxml_sample.xml')
    assert exp_materials == materials
 No newline at end of file