From 2fce9dc19746964e83c89304744b1c32f111fb0f Mon Sep 17 00:00:00 2001 From: Vincent Roseberry Date: Tue, 28 Jun 2022 00:00:32 +0000 Subject: [PATCH] Fix prophet test The new version of prophet (1.1) introduced breaking changes to the fit arguments. http://b/237327883 --- tests/test_prophet.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_prophet.py b/tests/test_prophet.py index 7b048d21..326dd5dc 100644 --- a/tests/test_prophet.py +++ b/tests/test_prophet.py @@ -8,9 +8,11 @@ class TestProphet(unittest.TestCase): def test_fit(self): train = pd.DataFrame({ - 'ds': np.array(['2012-05-18', '2012-05-20']), - 'y': np.array([38.23, 21.25]) + 'ds': np.array(['2012-05-18', '2012-05-19', '2012-05-20', '2012-05-21', '2012-05-22']), + 'y': np.array([38.23, 21.25, 20.18, 20.01, 19.02]) }) forecaster = Prophet(mcmc_samples=1) - forecaster.fit(train, control={'adapt_engaged': False}) + forecaster.fit(train, adapt_engaged=False) + + self.assertEqual(len(train) + 1, len(forecaster.make_future_dataframe(periods=1)))