test_functional.py 文件源码

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

项目:pyrepl 作者: dajose 项目源码 文件源码
def pytest_funcarg__child(request):
    try:
        pexpect = pytest.importorskip('pexpect')
    except SyntaxError:
        pytest.skip('pexpect wont work on py3k')
    child = pexpect.spawn(sys.executable, ['-S'], timeout=10)
    if sys.version_info >= (3, ):
        child.logfile = sys.stdout.buffer
    else:
        child.logfile = sys.stdout
    child.sendline('from pyrepl.python_reader import main')
    child.sendline('main()')
    return child
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号