matplotlib / matplotlib/pytest-mpl
Support hierarchical tests
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 272
- フォーク
- 53
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、pytest テストからベースライン画像名を導出するコードを見つけ、期待されるケースとして Test_Imageutils/test_put_text の例を使用します。Issue で説明されているフォルダー方式とファイル名方式を比較し、その後オプションを定義して、階層的な名前が一貫して生成されることを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- matplotlib, python
- 領域
- testing-qa
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100