Modify assertion statement for ignoring ordering of columns to pass on travis

This commit is contained in:
Ryan Nazareth 2019-11-05 00:25:49 +00:00 committed by Ben Letham
parent da05c039ee
commit 31c54d53be
2 changed files with 4 additions and 4 deletions

View file

@ -112,7 +112,8 @@ class TestDiagnostics(TestCase):
m.fit(df)
df_cv = diagnostics.cross_validation(
m, horizon='4 days', period='4 days', initial='115 days')
self.assertListEqual(['ds', 'yhat', 'y', 'cutoff'], df_cv.columns.tolist())
expected_cols = ['ds', 'yhat', 'y', 'cutoff']
self.assertTrue(all(col in expected_cols for col in df_cv.columns.tolist()))
def test_performance_metrics(self):
m = Prophet()

View file

@ -102,9 +102,8 @@ class TestProphet(TestCase):
m = Prophet(uncertainty_samples=uncertainty)
m.fit(train)
fcst = m.predict(future)
self.assertListEqual(['ds', 'trend', 'additive_terms', 'weekly',
'multiplicative_terms', 'yhat'],
fcst.columns.tolist())
expected_cols = ['ds', 'trend', 'additive_terms', 'multiplicative_terms', 'weekly', 'yhat']
self.assertTrue(all(col in expected_cols for col in fcst.columns.tolist()))
def test_setup_dataframe(self):
m = Prophet()