def test_val_set(self, config):
        """Test whether the evaluation set parameters are passed to the wrapped regression model."""
        (model_cls, model_kwargs, model_loc, model_import), use_weights, stride = config
        module_name, model_name = model_import.split(".")
        # mocking `fit` loses function signature. MultiOutputRegressor checks the function signature
        # internally, so we have to overwrite the mocked function signature with the original one.
        fit_sig = inspect.signature(
            getattr(importlib.import_module(module_name), model_name).fit
        )
        with patch(f"darts.models.forecasting.{model_loc}.fit") as fit_patch:
            fit_patch.__signature__ = fit_sig
            self.helper_check_val_set(
                model_cls,
                model_kwargs,
                fit_patch,
                use_weights=use_weights,
                stride=stride,
            )
Test whether the evaluation set parameters are passed to the wrapped regression model.
darts/tests/models/forecasting/test_sklearn_models.py