class_docstr: Tests specific to the IntervalIndex/Index constructors
code: def test_constructor_errors(self, klass):
      # mismatched closed within intervals with no constructor override
      ivs = [
          Interval(0, 1, closed="right"),
          Interval(2, 3, closed="left"),
      ]
      msg = "intervals must all be closed on the same side"
      with pytest.raises(ValueError, match=msg):
          klass(ivs)
  
      # scalar
      msg = (
          r"(IntervalIndex|Index)\(...\) must be called with a collection of "
          "some kind, 5 was passed"
      )
      with pytest.raises(TypeError, match=msg):
          klass(5)
  
      # not an interval; dtype depends on 32bit/windows builds
      msg = "type <class 'numpy.int(32|64)'> with value 0 is not an interval"
      with pytest.raises(TypeError, match=msg):
          klass([0, 1])
  
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 5 for calling the TestClassConstructors obj's underlying member method code with example usage: obj.test_constructor_errors(klass) without return types