test_menu_config.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:aws-ec2rescue-linux 作者: awslabs 项目源码 文件源码
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())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号