From 657e56e3066046a906e49026acc5e656becf8dae Mon Sep 17 00:00:00 2001 From: Felix Erdmann Date: Thu, 27 Feb 2025 19:08:10 +0100 Subject: [PATCH] more test - codecov --- pysteps/postprocessing/interface.py | 8 ++++---- pysteps/tests/test_interfaces.py | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pysteps/postprocessing/interface.py b/pysteps/postprocessing/interface.py index 63ab5684..97b96053 100644 --- a/pysteps/postprocessing/interface.py +++ b/pysteps/postprocessing/interface.py @@ -5,6 +5,10 @@ Interface for the postprocessing module. +Support postprocessing types: + - ensmeblestats + - diagnostics + .. currentmodule:: pysteps.postprocessing.interface .. autosummary:: @@ -101,10 +105,6 @@ def discover_postprocessors(): f"{plugintype}s", entry_point.attrs, ) - else: - raise ValueError( - f"Unknown module {entry_point.module_name} in the entrypoint {entry_point.name}" - ) def print_postprocessors_info(module_name, interface_methods, module_methods): diff --git a/pysteps/tests/test_interfaces.py b/pysteps/tests/test_interfaces.py index 7e634400..bfe1d668 100644 --- a/pysteps/tests/test_interfaces.py +++ b/pysteps/tests/test_interfaces.py @@ -197,12 +197,16 @@ def method_getter(name): # Test for invalid argument type with pytest.raises(TypeError): pysteps.postprocessing.interface.get_method("mean", None) + with pytest.raises(TypeError): pysteps.postprocessing.interface.get_method(None, "ensemblestats") # Test for invalid method types with pytest.raises(ValueError): pysteps.postprocessing.interface.get_method("mean", "forecast") + # Test print + pysteps.postprocessing.postprocessors_info() + def test_motion_interface(): """Test the motion module interface."""