<s> '''<STR_LIT>''' <EOL> __docformat__ = '<STR_LIT>' <EOL> __noninteractive = True <EOL> import unittest <EOL> from pyglet import gl <EOL> from pyglet import graphics <EOL> from pyglet . text import document <EOL> from pyglet . text import layout <EOL> from pyglet import window <EOL> class TestWindow ( window . Window ) : <EOL> def __init__ ( self , doctype , * args , ** kwargs ) : <EOL> super ( TestWindow , self ) . __init__ ( * args , ** kwargs ) <EOL> self . batch = graphics . Batch ( ) <EOL> self . document = doctype ( ) <EOL> self . layout = layout . IncrementalTextLayout ( self . document , <EOL> self . width , self . height , batch = self . batch ) <EOL> self . document . set_style ( <NUM_LIT:0> , len ( self . document . text ) , { "<STR_LIT>" : True } ) <EOL> def on_draw ( self ) : <EOL> gl . glClearColor ( <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:1> ) <EOL> self . clear ( ) <EOL> self . batch . draw ( ) <EOL> class TestCase ( unittest . TestCase ) : <EOL> def testUnformatted ( self ) : <EOL> self . window = TestWindow ( document . UnformattedDocument ) <EOL> self . window . dispatch_events ( ) <EOL> self . window . close ( ) <EOL> def testFormatted ( self ) : <EOL> self . window = TestWindow ( document . FormattedDocument ) <EOL> self . window . dispatch_events ( ) <EOL> self . window . close ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
