From e6a837c615458c248cf99aad2d836934c89b1355 Mon Sep 17 00:00:00 2001 From: Baudouin Raoult Date: Wed, 16 Oct 2024 04:41:42 +0000 Subject: [PATCH] Add test --- src/anemoi/transform/variables/__init__.py | 4 ++-- tests/test_transform.py | 17 ----------------- 2 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 tests/test_transform.py diff --git a/src/anemoi/transform/variables/__init__.py b/src/anemoi/transform/variables/__init__.py index 49dde8b..0776b59 100644 --- a/src/anemoi/transform/variables/__init__.py +++ b/src/anemoi/transform/variables/__init__.py @@ -18,10 +18,10 @@ def __init__(self, name: str) -> None: self.name = name @classmethod - def from_dict(cls, data: dict): + def from_dict(cls, name, data: dict): from .variables import VariableFromDict - return VariableFromDict(data) + return VariableFromDict(name, data) @classmethod def from_earthkit(cls, field): diff --git a/tests/test_transform.py b/tests/test_transform.py deleted file mode 100644 index edacad9..0000000 --- a/tests/test_transform.py +++ /dev/null @@ -1,17 +0,0 @@ -# (C) Copyright 2024 European Centre for Medium-Range Weather Forecasts. -# This software is licensed under the terms of the Apache Licence Version 2.0 -# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. -# In applying this licence, ECMWF does not waive the privileges and immunities -# granted to it by virtue of its status as an intergovernmental organisation -# nor does it submit to any jurisdiction. - - -def test_transform(): - pass - - -if __name__ == "__main__": - for name, obj in list(globals().items()): - if name.startswith("test_") and callable(obj): - print(f"Running {name}...") - obj()