code: def test_create_train_X_y_TypeError_when_exog_is_categorical_of_no_int():
      """
      Test TypeError is raised when exog is categorical with no int values.
      """
      y = pd.Series(np.arange(10))
      exog = pd.Series(["A", "B"] * 5, name="exog", dtype="category")
      forecaster = ForecasterAutoregCustom(
          regressor=LinearRegression(),
          fun_predictors=create_predictors,
          window_size=5,
      )
  
      err_msg = re.escape(
          (
              "If exog is of type category, it must contain only integer values. "
              "See skforecast docs for more info about how to include categorical "
              "features https://skforecast.org/"
              "latest/user_guides/categorical-features.html"
          )
      )
      with pytest.raises(TypeError, match=err_msg):
          forecaster.create_train_X_y(y=y, exog=exog)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregCustom import ForecasterAutoregCustom
  from skforecast.preprocessing import TimeSeriesDifferentiator
  from skforecast.exceptions import MissingValuesExogWarning
  from sklearn.linear_model import LinearRegression
  from sklearn.compose import ColumnTransformer
  from sklearn.preprocessing import StandardScaler
  from sklearn.preprocessing import OneHotEncoder
  from .fixtures_ForecasterAutoregCustom import data
label_desc: Use image node_id 2 for calling a global function with example usage: test_create_train_X_y_TypeError_when_exog_is_categorical_of_no_int() without return types