def test_menu_config_menu_scrolling_up(self):
"""Test paging down to the bottom of the Modules sub-menu thens scrolling up to the top."""
curses.initscr()
# Exit the menu
curses.ungetch("\n")
curses.ungetch(curses.KEY_RIGHT)
curses.ungetch("\n")
curses.ungetch(curses.KEY_RIGHT)
# Test scrolling up to the top
for i in range(len(self.modules)):
curses.ungetch(curses.KEY_UP)
# Go to the bottom of the Modules sub-menu
for iteration in range(15):
curses.ungetch(curses.KEY_NPAGE)
# Get into the Modules submenu
curses.ungetch("\n")
curses.ungetch(curses.KEY_DOWN)
self.assertTrue(self.menu())
评论列表
文章目录