diff --git a/src/eko/io/v2.py b/src/eko/io/v2.py index 59495c445..5442e3c81 100644 --- a/src/eko/io/v2.py +++ b/src/eko/io/v2.py @@ -23,4 +23,6 @@ def update_metadata(paths: InternalPaths, raw: dict) -> dict: compatible raw yaml content """ raw["data_version"] = 2 + raw["xgrid"] = raw["bases"]["xgrid"] + del raw["bases"] return raw diff --git a/tests/conftest.py b/tests/conftest.py index f273c3c2e..4ff7a8224 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -68,11 +68,6 @@ def operator_card(): return card -@pytest.fixture -def out_v0(): - return pathlib.Path(__file__).parent / "data" / "v0.8.5-obf24af_t8e1305.tar" - - class EKOFactory: def __init__(self, theory: TheoryCard, operator: OperatorCard, path: os.PathLike): self.path = path diff --git a/tests/data/v0.8.5-obf24af_t8e1305.tar b/tests/data/v0.8.5-obf24af_t8e1305.tar deleted file mode 100644 index 1a7344309..000000000 Binary files a/tests/data/v0.8.5-obf24af_t8e1305.tar and /dev/null differ diff --git a/tests/data/v2-LO-FFNS.tar b/tests/data/v2-LO-FFNS.tar new file mode 100644 index 000000000..2b85eafa8 Binary files /dev/null and b/tests/data/v2-LO-FFNS.tar differ diff --git a/tests/eko/io/test_init.py b/tests/eko/io/test_init.py deleted file mode 100644 index e5ca0e139..000000000 --- a/tests/eko/io/test_init.py +++ /dev/null @@ -1,15 +0,0 @@ -import pathlib - -import pytest - -from eko import EKO -from eko.io import legacy - - -class TestLegacy: - def test_load_tar(self, out_v0, tmp_path: pathlib.Path): - oppath = tmp_path / "eko.tar" - with pytest.warns(UserWarning, match="alphas"): - legacy.load_tar(out_v0, oppath) - with EKO.read(oppath) as eko: - assert eko.metadata.data_version == 0 diff --git a/tests/eko/io/test_legacy.py b/tests/eko/io/test_legacy.py deleted file mode 100644 index e274fd8e9..000000000 --- a/tests/eko/io/test_legacy.py +++ /dev/null @@ -1,19 +0,0 @@ -import pytest - -from eko.io import legacy - - -def test_op5to4(): - with pytest.raises(RuntimeError, match="not found"): - legacy.op5to4([], {}) - - mu2 = 1.959 - op = 29348.2342 - err = 54225.24 - op4s = legacy.op5to4([mu2], {legacy.OPERATOR: [op], legacy.ERROR: [err]}) - assert mu2 in op4s - assert op4s[mu2].operator == op - assert op4s[mu2].error == err - - op4s_noerr = legacy.op5to4([mu2], {legacy.OPERATOR: [op], legacy.ERROR: None}) - assert op4s_noerr[mu2].error is None diff --git a/tests/eko/io/test_v2.py b/tests/eko/io/test_v2.py new file mode 100644 index 000000000..c5e7f36bf --- /dev/null +++ b/tests/eko/io/test_v2.py @@ -0,0 +1,7 @@ +import pathlib + +TEST = pathlib.Path(__file__).parent / "data" / "v2-LO-FFNS.tar" + + +def load_v2(mp_path: pathlib.Path, out_v2): + pass