test_help_function.py 文件源码

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

项目:PlasoScaffolder 作者: ClaudiaSaxer 项目源码 文件源码
def testHelpMessage(self):
    """test the universal --help Option"""
    helper = end_to_end_test_helper.EndToEndTestHelper('not needed',
                                                       'not needed')

    if platform.system() in ['Linux']:
      message_help = ('Usage: main.py [OPTIONS] COMMAND [ARGS]...\r\n\r\n'
                      'Options:\r\n'
                      '  --help  Show this message and exit.\r\n\r\n'
                      'Commands:\r\n'
                      '  sqlite')
      command = 'python {0} --help'.format(helper.MAIN_PATH)
      child = pexpect.spawn(command)
      child.expect_exact(message_help)
    else:
      raise NotImplementedError("test only implemented for linux platform")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号