Skip to content

Commit

Permalink
Also sorting openmc output to sensure consistent output
Browse files Browse the repository at this point in the history
  • Loading branch information
JezSw committed Mar 20, 2024
1 parent 8794f3c commit e1e9377
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 @@ -450,7 +450,7 @@ def _read_openmc_output(self):
# stat_checks = []
outputs = {}
# test_path_openmc = os.path.join(self.test_path, "openmc")
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, "openmc")
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 @@ -119,8 +119,8 @@ def test_read_openmc_output(self, session_mock: MockUpSession):
tally_errors = outputs['M10'].tallydata['Error']
assert 0.827104 == pytest.approx(tally_values[10])
assert 0.000227628 == pytest.approx(tally_errors[176])
assert 0.10131285308571429 == pytest.approx(errors[0]['Neutron Spectra'])
assert 'M10' == results[0]['Zaid']
assert 0.10131285308571429 == pytest.approx(errors[1]['Neutron Spectra'])
assert 'M10' == results[1]['Zaid']

# Files
OUTP_SDDR = os.path.join(
Expand Down

0 comments on commit e1e9377

Please sign in to comment.