def test_lagged_prediction_data_single_point(self, config):
        """
        Tests that `create_lagged_prediction_data` correctly handles case
        where only one possible training point can be generated.
        """
        # Can only create feature using first value of target (i.e. `0`):
        series_type, use_moving_windows = config
        if series_type == "integer":
            target = linear_timeseries(start=0, length=1, start_value=0, end_value=1)
        else:
            target = linear_timeseries(
                start=pd.Timestamp("1/1/2000"), length=1, start_value=0, end_value=1
            )

        expected_X = np.zeros((1, 1, 1))
        # Prediction time extend beyond end of series:
        lag = 5
        X, times = create_lagged_prediction_data(
            target,
            lags=[-lag],
            use_moving_windows=use_moving_windows,
            uses_static_covariates=False,
        )
        assert np.allclose(expected_X, X)
        # Should only have one sample, generated for
        # `t = target.end_time() + lag * target.freq`:
        assert len(times) == 1
        assert times[0] == target.end_time() + lag * target.freq

        Tests that `create_lagged_prediction_data` correctly handles case
        where only one possible training point can be generated.
        
darts/tests/utils/tabularization/test_create_lagged_prediction_data.py