def test_fetch_cvimage_from_url_timeout(monkeypatch):
def long_func(*args, **kwargs):
time.sleep(3)
monkeypatch.setattr(requests, 'get', long_func)
with pytest.raises(TimeoutError):
classifiers.fetch_cvimage_from_url('this url is ignored', timeout_max_timeout=1)
test_deepanimebot_classifiers.py 文件源码
python
阅读 34
收藏 0
点赞 0
评论 0
评论列表
文章目录