test_menu_config.py 文件源码

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

项目:aws-ec2rescue-linux 作者: awslabs 项目源码 文件源码
def test_menu_config_view_long_module_help(self):
        """
        Test drawing the menu, selecting the modules menu, a module, and the module help, and then exiting the menu.
        In this test the help string is more (separated) lines than the window and should be truncated by the
        _draw_notification method.
        """
        # TODO working here
        num_messages = 0
        while num_messages < 100:
            self.menu["View all modules"]["aptlog"].helptext += "a\n"
            num_messages += 1
        curses.initscr()
        curses.ungetch("\n")
        curses.ungetch(curses.KEY_RIGHT)
        curses.ungetch("\n")
        curses.ungetch(curses.KEY_RIGHT)
        curses.ungetch("\n")
        curses.ungetch("\n")
        curses.ungetch(curses.KEY_RIGHT)
        curses.ungetch(curses.KEY_RIGHT)
        curses.ungetch("\n")
        curses.ungetch(curses.KEY_DOWN)
        self.assertTrue(self.menu())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号