Skip to content

Commit

Permalink
sorting mcnp outputs for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
JezSw committed Mar 20, 2024
1 parent c744b93 commit 8794f3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jade/sphereoutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def _read_mcnp_output(self):
stat_checks = []
outputs = {}
# test_path_mcnp = os.path.join(self.test_path, "mcnp")
for folder in os.listdir(self.test_path):
for folder in sorted(os.listdir(self.test_path)):
results_path = os.path.join(self.test_path, folder, "mcnp")
pieces = folder.split("_")
# Get zaid
Expand Down
4 changes: 2 additions & 2 deletions tests/sphereoutput_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def test_read_mcnp_output(self, session_mock: MockUpSession):
tally_errors = outputs['M10'].tallydata['Error']
assert 3.80420E-07 == pytest.approx(tally_values[10])
assert 0.0406 == pytest.approx(tally_errors[175])
assert 0.6213346456692914 == pytest.approx(errors[0]['Neutron Flux at the external surface in Vitamin-J 175 energy groups'])
assert 'M10' == results[0]['Zaid']
assert 0.6213346456692914 == pytest.approx(errors[1]['Neutron Flux at the external surface in Vitamin-J 175 energy groups'])
assert 'M10' == results[1]['Zaid']
assert stat_checks[1]['Gamma flux at the external surface [22]'] == 'Missed'

def test_read_openmc_output(self, session_mock: MockUpSession):
Expand Down

0 comments on commit 8794f3c

Please sign in to comment.