#NEWLINE# def test_draw_screen( self ) : #NEWLINE# #INDENT# lines = [ ( ( x [ 0 ] , None , ( '%s\n' % x [ 0 ] ) ) , ) for x in TaurusConsole . palette ] #NEWLINE# canvas = TestCanvas ( lines ) #NEWLINE# obj = Screen ( ) #NEWLINE# '\n        :type: bzt.modules.screen.GUIScreen\n        ' #NEWLINE# obj . register_palette ( TaurusConsole . palette ) #NEWLINE# obj . start ( ) #NEWLINE# for _ in range ( 1 , 10 ) : #NEWLINE# #INDENT# obj . draw_screen ( ( 1 , 1 ) , canvas ) #NEWLINE# time . sleep ( 0.5 ) #NEWLINE# #UNINDENT# if hasattr ( obj , 'font' ) : #NEWLINE# #INDENT# old_font_size = obj . font [ 'size' ] #NEWLINE# obj . root . event_generate ( '<Control-4>' ) #NEWLINE# obj . root . event_generate ( '<Control-MouseWheel>' , delta = 120 ) #NEWLINE# if ( old_font_size > 0 ) : #NEWLINE# #INDENT# self . assertGreater ( obj . font [ 'size' ] , old_font_size ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertLess ( obj . font [ 'size' ] , old_font_size ) #NEWLINE# #UNINDENT# obj . root . event_generate ( '<Control-5>' ) #NEWLINE# obj . root . event_generate ( '<Control-MouseWheel>' , delta = ( - 120 ) ) #NEWLINE# self . assertEqual ( obj . font [ 'size' ] , old_font_size ) #NEWLINE# #UNINDENT# obj . stop ( )