code: def test_train_test_split_uni_no_exo(load_pos_and_neg_data):
      """Tests the train-test splits for univariate time series without exogenous variables"""
      data = load_pos_and_neg_data
  
      ####################################
      # Continuous fh without Gaps ####
      ####################################
  
      # Integer fh ----
      exp = TSForecastingExperiment()
      fh = 12
      exp.setup(data=data, fh=fh, session_id=42)
      assert np.all(exp.dataset.index == data.index)
      assert np.all(
          exp.train.index == data.iloc[: (len(data) - fh)].index
      )
      assert np.all(exp.test.index == data.iloc[-fh:].index)
      assert exp.X is None
      assert np.all(exp.y.index == data.index)
      assert exp.X_train is None
      assert exp.X_test is None
      assert np.all(
          exp.y_train.index == data.iloc[: (len(data) - fh)].index
      )
      assert np.all(exp.y_test.index == data.iloc[-fh:].index)
      assert np.all(exp.dataset_transformed.index == data.index)
      assert np.all(
          exp.train_transformed.index
          == data.iloc[: (len(data) - fh)].index
      )
      assert np.all(exp.test_transformed.index == data.iloc[-fh:].index)
      assert exp.X_transformed is None
      assert np.all(exp.y_transformed.index == data.index)
      assert exp.X_train_transformed is None
      assert exp.X_test_transformed is None
      assert np.all(
          exp.y_train_transformed.index
          == data.iloc[: (len(data) - fh)].index
      )
      assert np.all(
          exp.y_test_transformed.index == data.iloc[-fh:].index
      )
  
      # Numpy fh ----
      exp = TSForecastingExperiment()
      fh = np.arange(1, 10)  # 9 values
      exp.setup(data=data, fh=fh, session_id=42)
      assert np.all(exp.dataset.index == data.index)
      assert np.all(
          exp.train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert np.all(exp.test.index == data.iloc[-len(fh) :].index)
      assert exp.X is None
      assert np.all(exp.y.index == data.index)
      assert exp.X_train is None
      assert exp.X_test is None
      assert np.all(
          exp.y_train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert np.all(exp.y_test.index == data.iloc[-len(fh) :].index)
      assert np.all(exp.dataset_transformed.index == data.index)
      assert np.all(
          exp.train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert np.all(
          exp.test_transformed.index == data.iloc[-len(fh) :].index
      )
      assert exp.X_transformed is None
      assert np.all(exp.y_transformed.index == data.index)
      assert exp.X_train_transformed is None
      assert exp.X_test_transformed is None
      assert np.all(
          exp.y_train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert np.all(
          exp.y_test_transformed.index == data.iloc[-len(fh) :].index
      )
  
      # List fh ----
      exp = TSForecastingExperiment()
      fh = [1, 2, 3, 4, 5, 6]
      exp.setup(data=data, fh=fh, session_id=42)
      assert np.all(exp.dataset.index == data.index)
      assert np.all(
          exp.train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert np.all(exp.test.index == data.iloc[-len(fh) :].index)
      assert exp.X is None
      assert np.all(exp.y.index == data.index)
      assert exp.X_train is None
      assert exp.X_test is None
      assert np.all(
          exp.y_train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert np.all(exp.y_test.index == data.iloc[-len(fh) :].index)
      assert np.all(exp.dataset_transformed.index == data.index)
      assert np.all(
          exp.train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert np.all(
          exp.test_transformed.index == data.iloc[-len(fh) :].index
      )
      assert exp.X_transformed is None
      assert np.all(exp.y_transformed.index == data.index)
      assert exp.X_train_transformed is None
      assert exp.X_test_transformed is None
      assert np.all(
          exp.y_train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert np.all(
          exp.y_test_transformed.index == data.iloc[-len(fh) :].index
      )
  
      #################################
      # Continuous fh with Gaps ####
      #################################
  
      # Numpy fh ----
      exp = TSForecastingExperiment()
      fh = np.arange(7, 13)  # 6 values
      exp.setup(data=data, fh=fh, session_id=42)
      assert np.all(exp.dataset.index == data.index)
      assert np.all(
          exp.train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.test) == len(fh)
      assert exp.X is None
      assert np.all(exp.y.index == data.index)
      assert exp.X_train is None
      assert exp.X_test is None
      assert np.all(
          exp.y_train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.y_test) == len(fh)
      assert np.all(exp.dataset_transformed.index == data.index)
      assert np.all(
          exp.train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.test_transformed) == len(fh)
      assert exp.X_transformed is None
      assert np.all(exp.y_transformed.index == data.index)
      assert exp.X_train_transformed is None
      assert exp.X_test_transformed is None
      assert np.all(
          exp.y_train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.y_test_transformed) == len(fh)
  
      # List fh ----
      exp = TSForecastingExperiment()
      fh = [4, 5, 6]
      exp.setup(data=data, fh=fh, session_id=42)
      assert np.all(exp.dataset.index == data.index)
      assert np.all(
          exp.train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.test) == len(fh)
      assert exp.X is None
      assert np.all(exp.y.index == data.index)
      assert exp.X_train is None
      assert exp.X_test is None
      assert np.all(
          exp.y_train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.y_test) == len(fh)
      assert np.all(exp.dataset_transformed.index == data.index)
      assert np.all(
          exp.train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.test_transformed) == len(fh)
      assert exp.X_transformed is None
      assert np.all(exp.y_transformed.index == data.index)
      assert exp.X_train_transformed is None
      assert exp.X_test_transformed is None
      assert np.all(
          exp.y_train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.y_test_transformed) == len(fh)
  
      ####################################
      # Discontinuous fh with Gaps ####
      ####################################
  
      # Numpy fh ----
      exp = TSForecastingExperiment()
      fh = np.array([4, 5, 6, 10, 11, 12])  # 6 values
      exp.setup(data=data, fh=fh, session_id=42)
      assert np.all(exp.dataset.index == data.index)
      assert np.all(
          exp.train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.test) == len(fh)
      assert exp.X is None
      assert np.all(exp.y.index == data.index)
      assert exp.X_train is None
      assert exp.X_test is None
      assert np.all(
          exp.y_train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.y_test) == len(fh)
      assert np.all(exp.dataset_transformed.index == data.index)
      assert np.all(
          exp.train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.test_transformed) == len(fh)
      assert exp.X_transformed is None
      assert np.all(exp.y_transformed.index == data.index)
      assert exp.X_train_transformed is None
      assert exp.X_test_transformed is None
      assert np.all(
          exp.y_train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.y_test_transformed) == len(fh)
  
      # List fh ----
      exp = TSForecastingExperiment()
      fh = [4, 5, 6, 10, 11, 12]
      exp.setup(data=data, fh=fh, session_id=42)
      assert np.all(exp.dataset.index == data.index)
      assert np.all(
          exp.train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.test) == len(fh)
      assert exp.X is None
      assert np.all(exp.y.index == data.index)
      assert exp.X_train is None
      assert exp.X_test is None
      assert np.all(
          exp.y_train.index == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.y_test) == len(fh)
      assert np.all(exp.dataset_transformed.index == data.index)
      assert np.all(
          exp.train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.test_transformed) == len(fh)
      assert exp.X_transformed is None
      assert np.all(exp.y_transformed.index == data.index)
      assert exp.X_train_transformed is None
      assert exp.X_test_transformed is None
      assert np.all(
          exp.y_train_transformed.index
          == data.iloc[: (len(data) - max(fh))].index
      )
      assert len(exp.y_test_transformed) == len(fh)
  
imports: import math
  import numpy
  import pandas
  import pytest
  from time_series_test_utils import _get_seasonal_values, _get_seasonal_values_alphanumeric, _return_data_seasonal_types_strictly_pos, _return_setup_args_raises, _return_splitter_args
  from pycaret.datasets import get_data
  from pycaret.time_series import TSForecastingExperiment
label_desc: Use image node_id 13 for calling a global function with example usage: test_train_test_split_uni_no_exo(load_pos_and_neg_data) without return types