diff --git a/jade/sphereoutput.py b/jade/sphereoutput.py index cdb5f552..cfb85253 100644 --- a/jade/sphereoutput.py +++ b/jade/sphereoutput.py @@ -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 diff --git a/tests/sphereoutput_test.py b/tests/sphereoutput_test.py index a6754a80..b6ebbde4 100644 --- a/tests/sphereoutput_test.py +++ b/tests/sphereoutput_test.py @@ -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(