def test_gloo_without_app():
 class DummyParser(gloo.glir.BaseGlirParser, ):
  def __init__(self):
   self.commands = []
  def parse(self, commands):
   self.commands.extend(commands)
 p = DummyParser()
 c = gloo.context.FakeCanvas()
 c.context.shared.parser = p
 gloo.clear()
 c.flush()
 gloo.clear()
 c.flush()
 assert (len(p.commands) in (2, 3))
 assert (p.commands[(-1)][1] == 'glClear')

def test_gloo_without_app ( ) : class DummyParser ( gloo . glir . BaseGlirParser , ) : def __init__ ( self ) : self . commands = [ ] def parse ( self , commands ) : self . commands . extend ( commands ) p = DummyParser ( ) c = gloo . context . FakeCanvas ( ) c . context . shared . parser = p gloo . clear ( ) c . flush ( ) gloo . clear ( ) c . flush ( ) assert ( len ( p . commands ) in ( 2 , 3 ) ) assert ( p . commands [ ( - 1 ) ] [ 1 ] == 'glClear' )
test gloo without vispy .