test_nameserver.py 文件源码

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

项目:osbrain 作者: opensistemas-hub 项目源码 文件源码
def test_nameserver_spawn_process(nsproxy):
    """
    A name server should be able to spawn child processes.

    It is a way to make sure name servers are run as non-daemonic processes,
    which are not allowed to have children.
    """
    class Spawner(NameServer):
        def spawn_process(self):
            p = multiprocessing.Process()
            p.start()
            return True

    ns = run_nameserver(base=Spawner)
    assert ns.spawn_process()
    ns.shutdown()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号