test_endpoints_daemon.py 文件源码

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

项目:concierge 作者: 9seconds 项目源码 文件源码
def test_track_cannot_read(no_sleep, mock_mainfunc, ptmpdir):
    _, _, inotifier = mock_mainfunc

    def add_watch(*args, **kwargs):
        exc = IOError("Hello?")
        exc.errno = errno.EPERM

        raise exc

    inotifier.add_watch.side_effect = add_watch

    app = get_app()
    app.destination_path = ptmpdir.join("filename").strpath

    with pytest.raises(IOError):
        app.track()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号