diff --git a/tests/regression_tests/microxs/test.py b/tests/regression_tests/microxs/test.py index dbfe3357b..f92f61479 100644 --- a/tests/regression_tests/microxs/test.py +++ b/tests/regression_tests/microxs/test.py @@ -4,9 +4,10 @@ from pathlib import Path import numpy as np import pytest import openmc - from openmc.deplete import MicroXS +from tests.regression_tests import config + CHAIN_FILE = Path(__file__).parents[2] / "chain_simple.xml" @pytest.fixture(scope="module") @@ -46,7 +47,10 @@ def model(): def test_from_model(model): - ref_xs = MicroXS.from_csv('test_reference.csv') test_xs = MicroXS.from_model(model, model.materials[0], CHAIN_FILE) + if config['update']: + test_xs.to_csv('test_reference.csv') + + ref_xs = MicroXS.from_csv('test_reference.csv') np.testing.assert_allclose(test_xs, ref_xs, rtol=1e-11)