class_docstr: Common tests for all variations of IntervalIndex construction. Input data
  to be supplied in breaks format, then converted by the subclass method
  get_kwargs_from_breaks to the expected format.
code: def test_generic_errors(self, constructor):
      # filler input data to be used when supplying invalid kwargs
      filler = self.get_kwargs_from_breaks(range(10))
  
      # invalid closed
      msg = "closed must be one of 'right', 'left', 'both', 'neither'"
      with pytest.raises(ValueError, match=msg):
          constructor(closed="invalid", **filler)
  
      # unsupported dtype
      msg = "dtype must be an IntervalDtype, got int64"
      with pytest.raises(TypeError, match=msg):
          constructor(dtype="int64", **filler)
  
      # invalid dtype
      msg = "data type [\"']invalid[\"'] not understood"
      with pytest.raises(TypeError, match=msg):
          constructor(dtype="invalid", **filler)
  
      # no point in nesting periods in an IntervalIndex
      periods = period_range("2000-01-01", periods=10)
      periods_kwargs = self.get_kwargs_from_breaks(periods)
      msg = "Period dtypes are not supported, use a PeriodIndex instead"
      with pytest.raises(ValueError, match=msg):
          constructor(**periods_kwargs)
  
      # decreasing values
      decreasing_kwargs = self.get_kwargs_from_breaks(range(10, -1, -1))
      msg = "left side of interval must be <= right side"
      with pytest.raises(ValueError, match=msg):
          constructor(**decreasing_kwargs)
  
imports: from functools import partial
  import numpy
  import pytest
  import pandas.util._test_decorators
  from pandas.core.dtypes.common import is_unsigned_integer_dtype
  from pandas.core.dtypes.dtypes import IntervalDtype
  from pandas import Categorical, CategoricalDtype, CategoricalIndex, Index, Interval, IntervalIndex, date_range, notna, period_range, timedelta_range
  import pandas._testing
  from pandas.core.arrays import IntervalArray
  import pandas.core.common
label_desc: Use image node_id 8 for calling the ConstructorTests obj's underlying member method code with example usage: obj.test_generic_errors(constructor) without return types