class_docstr: Tests allowable data formats when constructing
  the basic Element types.
code: def test_hline_invalid_constructor(self):
      if Version(param.__version__) > Version("2.0.0a2"):
          err = "ClassSelector parameter 'HLine.y' value must be an instance of"
      else:
          err = (
              "ClassSelector parameter 'y' value must be an instance of"
          )
      with pytest.raises(ValueError) as excinfo:
          HLine(None)
      assert err in str(excinfo.value)
  
file_path: holoviews/holoviews/tests/element/test_annotations.py
imports: import numpy
  import param
  import pytest
  from packaging.version import Version
  from holoviews import Annotation, Arrow, HLine, Spline, Text, VLine
  from holoviews.element import Points
  from holoviews.element.comparison import ComparisonTestCase
label_desc: Use image node_id 1 for calling the AnnotationTests obj's underlying member method code with example usage: obj.test_hline_invalid_constructor() without return types