Support hierarchical tests
还没有人认领这个 Issue。
- #114 来自 @theRealSuperMario —— 已关闭,未合并
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- matplotlib, python
- 领域
- testing-qa
调研方向
首先定位从 pytest 测试中推导基线图像名称的代码,并使用 Test_Imageutils/test_put_text 示例作为预期情况。比较 issue 中描述的文件夹方式和文件名方式,然后定义该选项,并验证是否能够一致地生成层级名称。
由索引模型根据 Issue 内容生成。
描述
Hi,
I am working a lot with images and therefore love the idea of the project. I played around with it a little bit and noticed something.
When I group my tests in classes, the image file gets named only after the function that calls it.
Example:
class Test_Imageutils:
@pytest.mark.mpl_image_compare
def test_put_text(self):
from skimage import data
astronaut = data.astronaut()
annotated = imageutils.put_text(astronaut.copy(), "hi", loc="center")
fig, ax = plt.subplots(1, 1, figsize=(6, 6))
ax.imshow(annotated)
return fig
And the image in baseline is named test_put_text.png
I think it would be a great idea to add an option to write the full hierarchy, either into folders or into the file name. For example
baseline/Test_Imageutils/test_put_text.pngbaseline/Test_Imageutils-test_put_text.png
What do you think?
I could dig a little into the code and come up with a PR if anyone thinks it is a good idea.
- 主要语言
- Python
- 星标
- 274
- 派生
- 53
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
matplotlib/pytest-mpl 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
matplotlib/pytest-mpl#264 · 2 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
matplotlib/pytest-mpl#263 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
matplotlib/pytest-mpl#262 · 6 条评论 ·
-
难度 4/5 3-5 天 新手友好度 45/100
matplotlib/pytest-mpl#261 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
matplotlib/pytest-mpl#257 · 2 条评论 ·
查看 matplotlib/pytest-mpl 的全部 Issue
相似的 Issue
-
[Doc]: Feedback for `/zh-cn/v0.30.0/tutorials/models/Qwen3.6-35B-A3B.html`A3社区配置和基线不一致,社区配置也达不到基线未关闭documentation
难度 2/5 1-3 小时 新手友好度 62/100
vllm-project/vllm-ascend#24429 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
nq-rdl/agent-extensions#623 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
vortex-data/vortex#12633 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
gke-labs/kube-agents#7955 ·
维护者通常 1 天内回复