code: def test_gloo_without_app():
      """Test gloo without vispy.app (with FakeCanvas)"""
  
      # Create dummy parser
      class DummyParser(gloo.glir.BaseGlirParser):
          def __init__(self):
              self.commands = []
  
          def parse(self, commands):
              self.commands.extend(commands)
  
      p = DummyParser()
  
      # Create fake canvas and attach our parser
      c = gloo.context.FakeCanvas()
      c.context.shared.parser = p
  
      # Do some commands
      gloo.clear()
      c.flush()
      gloo.clear()
      c.flush()
  
      assert len(p.commands) in (2, 3)  # there may be a CURRENT command
      assert p.commands[-1][1] == "glClear"
  
file_path: vispy/vispy/gloo/tests/test_context.py
imports: import gc
  from vispy.testing import assert_in, run_tests_if_main, assert_raises, assert_equal, assert_not_equal
  from vispy import gloo
  from vispy.gloo import GLContext, get_default_config
label_desc: Use image node_id 3 for calling a global function with example usage: test_gloo_without_app() without return types