diff --git a/jade/sphereoutput.py b/jade/sphereoutput.py index ff4db7a2..cdb5f552 100644 --- a/jade/sphereoutput.py +++ b/jade/sphereoutput.py @@ -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 diff --git a/tests/sphereoutput_test.py b/tests/sphereoutput_test.py index c24de5ba..a6754a80 100644 --- a/tests/sphereoutput_test.py +++ b/tests/sphereoutput_test.py @@ -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):