def test_fit_no_cache_does_not_store_X_train_y_train( self, time_series, time_series_forecasting_model1_no_cache): time_series_forecasting_model1_no_cache.fit(time_series) assert not hasattr(time_series_forecasting_model1_no_cache, "X_train_") assert not hasattr(time_series_forecasting_model1_no_cache, "y_train_")
def test_error_fit_twice_no_cache_only_models( self, time_series, time_series_forecasting_model1_no_cache): with pytest.raises(AttributeError): time_series_forecasting_model1_no_cache.fit(time_series).fit( time_series, only_model=True)
def test_fit_no_cache_stores_X_test_and_model( self, time_series, time_series_forecasting_model1_no_cache): time_series_forecasting_model1_no_cache.fit(time_series) assert hasattr(time_series_forecasting_model1_no_cache, "model_") assert hasattr(time_series_forecasting_model1_no_cache, "X_test_")
def test_predict_works_input(self, time_series, time_series_forecasting_model1_no_cache): time_series_forecasting_model1_no_cache.fit(time_series).predict( time_series)