class_docstr: Module level tests for all sktime forecasters.
class_docstr_tok: ["Module","level","tests","for","all","sktime","forecasters","."]
docstr: Check cutoff and _y.
docstr_tok: ["Check","cutoff","and","_y","."]
code: def test__y_and_cutoff(self, estimator_instance, n_columns):
      """Check cutoff and _y."""
      # check _y and cutoff is None after construction
      f = estimator_instance
  
      y = _make_series(n_columns=n_columns)
      y_train, y_test = temporal_train_test_split(y, train_size=0.75)
  
      # check that _y and cutoff are empty when estimator is constructed
      assert f._y is None
      assert f.cutoff is None
  
      # check that _y and cutoff is updated during fit
      f.fit(y_train, fh=FH0)
      # assert isinstance(f._y, pd.Series)
      # action:uncomments the line above
      # why: fails for multivariates cause they are DataFrames
      # solution: look for a general solution for Series and DataFrames
      assert len(f._y) > 0
      assert f.cutoff == y_train.index[-1]
  
      # check data pointers
      np.testing.assert_array_equal(f._y.index, y_train.index)
  
      # check that _y and cutoff is updated during update
      f.update(y_test, update_params=False)
      np.testing.assert_array_equal(
          f._y.index, np.append(y_train.index, y_test.index)
      )
      assert f.cutoff == y_test.index[-1]
  
imports: import numpy
  import pandas
  import pytest
  from sktime.datatypes import check_is_mtype
  from sktime.datatypes._utilities import get_cutoff
  from sktime.exceptions import NotFittedError
  from sktime.forecasting.base._delegate import _DelegatedForecaster
  from sktime.forecasting.base._fh import ForecastingHorizon
  from sktime.forecasting.tests._config import TEST_ALPHAS, TEST_FHS, TEST_OOS_FHS, TEST_STEP_LENGTHS_INT, TEST_WINDOW_LENGTHS_INT, VALID_INDEX_FH_COMBINATIONS
  from sktime.performance_metrics.forecasting import mean_absolute_percentage_error
  from sktime.split import ExpandingWindowSplitter, SlidingWindowSplitter, temporal_train_test_split
  from sktime.tests.test_all_estimators import BaseFixtureGenerator, QuickTester
  from sktime.utils._testing.forecasting import _assert_correct_columns, _assert_correct_pred_time_index, _get_expected_index_for_update_predict, _get_n_columns, _make_fh, make_forecasting_problem
  from sktime.utils._testing.series import _make_series
  from sktime.utils.validation.forecasting import check_fh
label_desc: Use image node_id 20 for calling the TestAllForecasters obj's underlying member method code with example usage: obj.test__y_and_cutoff(estimator_instance, n_columns) without return types