code: def test_attributes():
      """Test if attribute checks are in place"""
      with TestingCanvas():
          # initialize with major axis < minor axis
          with raises(ValueError):
              create_colorbar(
                  pos=(50, 50), size=(1, 30), orientation="top"
              )
  
          # set major axis to 0
          with raises(ValueError):
              create_colorbar(
                  pos=(50, 50), size=(0, 1), orientation="right"
              )
  
          # set negative major axis
          with raises(ValueError):
              create_colorbar(
                  pos=(50, 50), size=(-10, 1), orientation="right"
              )
  
          # set negative minor axis
          with raises(ValueError):
              create_colorbar(
                  pos=(50, 50), size=(1, -10), orientation="right"
              )
  
          # set minor axis to 0
          with raises(ValueError):
              create_colorbar(
                  pos=(50, 50), size=(1, 0), orientation="right"
              )
  
          # set invalid orientation
          with raises(ValueError):
              create_colorbar(
                  pos=(50, 50), size=(60, 4), orientation="top-invalid"
              )
  
file_path: vispy/vispy/visuals/tests/test_colorbar.py
imports: from vispy.scene import visuals
  from vispy.testing import requires_application, TestingCanvas, run_tests_if_main, raises
  from vispy.testing.image_tester import assert_image_approved
label_desc: Use image node_id 4 for calling a global function with example usage: test_attributes() without return types