def test_backtest_bad_covariates(self, model_cls):
        """Passing unsupported covariate should raise an exception"""
        series = lt(start_value=1, end_value=10, length=31, dtype="float32")
        model = model_cls()
        bt_kwargs = {"start": -1, "start_format": "position", "show_warnings": False}
        model.backtest(series=series, **bt_kwargs)

        with pytest.raises(ValueError) as msg:
            model.backtest(series=series, past_covariates=series, **bt_kwargs)
        assert str(msg.value).startswith(
            "Model cannot be fit/trained with `past_covariates`."
        )
        if not model.supports_future_covariates:
            with pytest.raises(ValueError) as msg:
                model.backtest(series=series, future_covariates=series, **bt_kwargs)
            assert str(msg.value).startswith(
                "Model cannot be fit/trained with `future_covariates`."
            )
Passing unsupported covariate should raise an exception
darts/tests/models/forecasting/test_backtesting.py