From 71ca505732eb2cfe9b5a1f1d3eee91390a94de86 Mon Sep 17 00:00:00 2001 From: Ben Letham Date: Tue, 4 Feb 2020 15:40:04 -0800 Subject: [PATCH] Add test for cross validation with invalid metrics --- python/fbprophet/tests/test_diagnostics.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/fbprophet/tests/test_diagnostics.py b/python/fbprophet/tests/test_diagnostics.py index 5c760bd..d50d859 100644 --- a/python/fbprophet/tests/test_diagnostics.py +++ b/python/fbprophet/tests/test_diagnostics.py @@ -164,6 +164,11 @@ class TestDiagnostics(TestCase): df_cv, metrics=['mape'], ) self.assertIsNone(df_horizon) + # List of metrics containing non-valid metrics + with self.assertRaises(ValueError): + diagnostics.performance_metrics( + df_cv, metrics=['mse', 'error_metric'], + ) def test_rolling_mean(self): x = np.arange(10)