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())
评论列表
文章目录