docstr: Tests that `Diff` throws error is length of series is less than `sum(lags)` (i.e.
  there's not enough data to fit the differencer)
docstr_tok: ["Tests","that","`","Diff","`","throws","error","is","length","of","series","is","less","than","`","sum","(","lags",")","`","(","i.e",".","there","'s","not","enough","data","to","fit","the","differencer",")"]
code: def test_diff_series_too_short(self):
      """
      Tests that `Diff` throws error is length of series is less than `sum(lags)` (i.e.
      there's not enough data to fit the differencer)
      """
      lags = (1000,)
      diff = Diff(lags=lags)
      with pytest.raises(ValueError) as e:
          diff.fit(self.sine_series)
      assert (
          f"Series requires at least {sum(lags) + 1} timesteps "
          f"to difference with lags {lags}; series only "
          f"has {self.sine_series.n_timesteps} timesteps."
      ) == str(e.value)
  
imports: from copy import deepcopy
  from typing import Optional, Sequence
  import numpy
  import pandas
  import pytest
  from darts.dataprocessing.transformers import Diff
  from darts.timeseries import TimeSeries
  from darts.timeseries import concatenate
  from darts.utils.timeseries_generation import linear_timeseries, sine_timeseries
label_desc: Use image node_id 7 for calling the TestDiff obj's underlying member method code with example usage: obj.test_diff_series_too_short() without return types