test_kernel.py 文件源码

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

项目:dfkernel 作者: dataflownb 项目源码 文件源码
def test_shutdown():
    """Kernel exits after polite shutdown_request"""
    with new_kernel() as kc:
        km = kc.parent
        execute(u'a = 1', kc=kc)
        wait_for_idle(kc)
        kc.shutdown()
        for i in range(100): # 10s timeout
            if km.is_alive():
                time.sleep(.1)
            else:
                break
        nt.assert_false(km.is_alive())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号