Example #1
0
 def test_menu_items_ascii_margins_and_padding(self):
     print_screen_edge()
     sect = MenuItemsSection(MenuStyle(margins=MenuMargins(2, 8, 2, 8),
                                       padding=MenuPadding(1, 8, 1, 8)),
                             items=self.small_list)
     for line in sect.generate():
         print(line)
Example #2
0
 def test_show_top_border_for_items(self):
     print_screen_edge()
     sect = MenuItemsSection(MenuStyle(border_style=LightBorderStyle()),
                             items=self.large_list)
     sect.show_item_top_border('menu_item_4', True)
     sect.show_item_top_border('menu_item_8', True)
     sect.show_item_top_border('menu_item_12', True)
     for line in sect.generate():
         print(line)
Example #3
0
 def test_show_both_borders_for_items_then_disable_borders(self):
     print_screen_edge()
     sect = MenuItemsSection(MenuStyle(border_style=LightBorderStyle()),
                             items=self.large_list)
     sect.show_item_top_border('menu_item_4', True)
     sect.show_item_bottom_border('menu_item_4', True)
     sect.show_item_top_border('menu_item_8', True)
     sect.show_item_bottom_border('menu_item_8', True)
     sect.show_item_top_border('menu_item_12', True)
     sect.show_item_bottom_border('menu_item_12', True)
     print("This should show top and bottom borders on items 4, 8, and 12")
     for line in sect.generate():
         print(line)
     sect.show_item_top_border('menu_item_4', False)
     sect.show_item_bottom_border('menu_item_4', False)
     sect.show_item_top_border('menu_item_8', False)
     sect.show_item_bottom_border('menu_item_8', False)
     sect.show_item_top_border('menu_item_12', False)
     sect.show_item_bottom_border('menu_item_12', False)
     print("This should not show any borders on any item")
     for line in sect.generate():
         print(line)
Example #4
0
 def test_menu_items_unicodelight(self):
     print_screen_edge()
     sect = MenuItemsSection(MenuStyle(border_style=LightBorderStyle()),
                             items=self.small_list)
     for line in sect.generate():
         print(line)
Example #5
0
 def test_menu_items_ascii_padding_large_list(self):
     print_screen_edge()
     sect = MenuItemsSection(MenuStyle(padding=MenuPadding(1, 4, 1, 4)),
                             items=self.large_list)
     for line in sect.generate():
         print(line)
Example #6
0
 def test_menu_items_ascii(self):
     print_screen_edge()
     sect = MenuItemsSection(MenuStyle(), items=self.small_list)
     for line in sect.generate():
         print(line)
Example #7
0
 def test_menu_items_ascii_no_items(self):
     print_screen_edge()
     sect = MenuItemsSection(MenuStyle())
     for line in sect.generate():
         print(line)