test_child_processes.py 文件源码

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

项目:artemis 作者: QUVA-Lab 项目源码 文件源码
def test_remote_python_process():

    in_debug_mode = sys.gettrace() is not None

    p = RemotePythonProcess(
        function=partial(my_func, a=1, b=2),
        ip_address='localhost',
        )

    stdin , stdout, stderr = p.execute_child_process()
    time.sleep(.1)  # That autta be enough

    errtext = stderr.read()
    if in_debug_mode:
        assert errtext.startswith('pydev debugger: ')
    else:
        assert errtext == '', errtext
    assert stdout.read() == 'hello hello hello\n'
    assert p.get_return_value()==3
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号