def test_lagged_prediction_data_no_lags_specified_error(self):
        """
        Tests that `create_lagged_prediction_data` throws correct error
        when no lags are specified.
        """
        target = linear_timeseries(start=1, length=20, freq=1)
        # Check error thrown by 'moving windows' method and by 'time intersection' method:
        for use_moving_windows in (False, True):
            with pytest.raises(ValueError) as err:
                create_lagged_prediction_data(
                    target_series=target,
                    use_moving_windows=use_moving_windows,
                    uses_static_covariates=False,
                )
            assert (
                "Must specify at least one of: `lags`, `lags_past_covariates`, `lags_future_covariates`."
                == str(err.value)
            )

        Tests that `create_lagged_prediction_data` throws correct error
        when no lags are specified.
        
darts/tests/utils/tabularization/test_create_lagged_prediction_data.py