test_command_line.py 文件源码

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

项目:Dallinger 作者: Dallinger 项目源码 文件源码
def test_debug_bots(self, env):
        # Make sure debug server runs to completion with bots
        p = pexpect.spawn(
            'dallinger',
            ['debug', '--verbose', '--bot'],
            env=env,
        )
        p.logfile = sys.stdout
        try:
            p.expect_exact('Server is running', timeout=300)
            p.expect_exact('Recruitment is complete', timeout=600)
            p.expect_exact('Experiment completed', timeout=60)
            p.expect_exact('Local Heroku process terminated', timeout=10)
        finally:
            try:
                p.sendcontrol('c')
                p.read()
            except IOError:
                pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号