code: def test_errors(self):
      # not enough params
      msg = (
          "Of the four parameters: start, end, periods, and freq, "
          "exactly three must be specified"
      )
      with pytest.raises(ValueError, match=msg):
          timedelta_range(start="0 days")
  
      with pytest.raises(ValueError, match=msg):
          timedelta_range(end="5 days")
  
      with pytest.raises(ValueError, match=msg):
          timedelta_range(periods=2)
  
      with pytest.raises(ValueError, match=msg):
          timedelta_range()
  
      # too many params
      with pytest.raises(ValueError, match=msg):
          timedelta_range(
              start="0 days", end="5 days", periods=10, freq="h"
          )
  
file_path: pandas/pandas/tests/indexes/timedeltas/test_timedelta_range.py
imports: import numpy
  import pytest
  from pandas import Timedelta, TimedeltaIndex, timedelta_range, to_timedelta
  import pandas._testing
  from pandas.tseries.offsets import Day, Second
label_desc: Use image node_id 6 for calling the TestTimedeltas obj's underlying member method code with example usage: obj.test_errors() without return types