def skip_test_permute(self): import cgitb try: for x in [0, 10]: for y in [0, 10]: for width in [2, 10, 30]: for height in [2, 10, 30]: for border_fg in [colors.RED, colors.WHITE, colors.BLACK]: for interior_fg in [colors.WHITE, colors.LIGHTGREY]: for border_bg in [colors.BLACK, colors.BLUE]: for interior_bg in [colors.BLACK, colors.DARKGREY]: for draw_left in [False, True]: for draw_right in [False, True]: for draw_top in [False, True]: for draw_bottom in [False, True]: for boxtype in [boxtypes.BoxDouble, boxtypes.BoxSingle]: self.draw_box(buffer.Box(x=x, y=y, width=width, height=height,border_fg=border_fg, interior_fg=interior_fg,border_bg=border_bg, interior_bg=interior_bg,draw_left=draw_left, draw_right=draw_right,draw_top=draw_top, draw_bottom=draw_bottom,boxtype=boxtype)) except: #resize changes the scrollback buffer size... term.resize(width=self.width, height=300) cgitb.Hook(format="text").handle() raise
def skip_test_permute(self): import cgitb try: for x in [0, 10]: for y in [0, 10]: for width in [2, 10, 30]: for height in [2, 10, 30]: for border_fg in [ colors.RED, colors.WHITE, colors.BLACK ]: for interior_fg in [ colors.WHITE, colors.LIGHTGREY ]: for border_bg in [ colors.BLACK, colors.BLUE ]: for interior_bg in [ colors.BLACK, colors.DARKGREY ]: for draw_left in [False, True]: for draw_right in [ False, True ]: for draw_top in [ False, True ]: for draw_bottom in [ False, True ]: for boxtype in [ boxtypes. BoxDouble, boxtypes. BoxSingle ]: self.draw_box( buffer.Box( x=x, y=y, width= width, height= height, border_fg =border_fg, interior_fg =interior_fg, border_bg =border_bg, interior_bg =interior_bg, draw_left =draw_left, draw_right =draw_right, draw_top =draw_top, draw_bottom =draw_bottom, boxtype= boxtype )) except: #resize changes the scrollback buffer size... term.resize(width=self.width, height=300) cgitb.Hook(format="text").handle() raise
def test_resize(self): #change both term.resize(80, 24) # try it twice to change nothing term.resize(80, 24) #grow both term.resize(120, 60) #shrink Y term.resize(120, 59) #grow Y term.resize(120, 61) #shrink X term.resize(118, 61) #grow X term.resize(120, 61) #grow one, shrink the other term.resize(121, 60) term.resize(119, 62) #change nothing term.resize(119, 62) #restore term.resize(self.width, self.height)