确保在调用pytest时正确修补gevent
项目描述
pytest-gevent
确保在调用pytest时正确修补gevent
安装
pip install pytest-gevent
使用
在您会使用pytest
的地方,使用pytest-gevent
代替。
禁用特定补丁
您可以通过环境变量禁用特定的gevent补丁。例如,如果您想禁用ssl
补丁,您将调用
PYTEST_GEVENT_PATCH_ALL_NO_SSL=1 pytest-gevent
这是如何工作的
这调用gevent.monkey.patch_all(...)
然后调用pytest.main()
替代方案
gevent.monkey
直接提供cli,尽管使用起来相当笨拙
python -m gevent.monkey $(which pytest) ...
# with gevent 1.5+ you'll be able to do
# python -m gevent.monkey --module pytest ...
项目详情
关闭
pytest_gevent-1.1.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 8bbf6d7f9db3bae3dc2d7c3d18cfe32efa1568cdf8b624348e92f64c0b857581 |
|
MD5 | 7efcbc21ffd2f2d64954826e94aa4b51 |
|
BLAKE2b-256 | ab49cbed2ecff68e851a454437e7a80f05e483409eff3a6bef9fab31038d4018 |
关闭
pytest_gevent-1.1.0-py2.py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a9d8ea2b6cc7e1e4fe51195194750ce404c1b842a60f045dcc92ce8425309f64 |
|
MD5 | f547f65ad00ea330e72bd21a861446a9 |
|
BLAKE2b-256 | c0a22874d536e202107b118afc0df8692c7119543666d5231846925198ae8b1a |