17 Star 0 Fork 1

openKylin/python-importlib-metadata

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
conftest.py 668 Bytes
一键复制 编辑 原始数据 按行查看 历史
LLL 提交于 2022-09-07 14:34 . Import Upstream version 4.12.0
import sys
collect_ignore = [
# this module fails mypy tests because 'setup.py' matches './setup.py'
'prepare/example/setup.py',
]
def pytest_configure():
remove_importlib_metadata()
def remove_importlib_metadata():
"""
Because pytest imports importlib_metadata, the coverage
reports are broken (#322). So work around the issue by
undoing the changes made by pytest's import of
importlib_metadata (if any).
"""
if sys.meta_path[-1].__class__.__name__ == 'MetadataPathFinder':
del sys.meta_path[-1]
for mod in list(sys.modules):
if mod.startswith('importlib_metadata'):
del sys.modules[mod]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openkylin/python-importlib-metadata.git
git@gitee.com:openkylin/python-importlib-metadata.git
openkylin
python-importlib-metadata
python-importlib-metadata
openkylin/yangtze

搜索帮助