code: def test_text():
      """Test basic text support"""
      with TestingCanvas(bgcolor="w", size=(92, 92), dpi=92) as c:
          pos = [92 // 2] * 2
          text = Text(
              "testing",
              font_size=20,
              color="k",
              pos=pos,
              anchor_x="center",
              anchor_y="baseline",
              parent=c.scene,
          )
          # Test image created in Illustrator CS5, 1"x1" output @ 92 DPI
          assert_image_approved(c.render(), "visuals/text1.png")
  
          text.text = ["foo", "bar"]
          text.pos = [10, 10]  # should auto-replicate
          text.rotation = [180, 270]
          try:
              text.pos = [10]
          except Exception:
              pass
          else:
              raise AssertionError("Exception not raised")
          c.update()
          c.app.process_events()
          text.pos = [[10, 10], [10, 20]]
          text.text = "foobar"
          c.update()
          c.app.process_events()
  
file_path: vispy/vispy/visuals/tests/test_text.py
imports: import numpy
  from numpy.testing import assert_allclose
  from vispy.scene.visuals import Text
  from vispy.testing import requires_application, TestingCanvas, run_tests_if_main
  from vispy.testing.image_tester import assert_image_approved
label_desc: Use image node_id 1 for calling a global function with example usage: test_text() without return types