Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

pytest_bdd_apply_tag does not detect Gherkin example tags

オープン
#774 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
62/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
testing

調査の方向性

まず pytest_bdd_apply_tag フックと、Gherkin の Example に対する既存のタグ処理を見つけ、次に @skip と @xfail に関連するテストを調べます。Example テーブルに配置されたカスタムタグのカバレッジを追加し、既存の Example テーブルの動作を変更せずにフックがそれらを受け取ることを検証します。

索引モデルが issue の本文から書いたものです。

説明

Is your feature request related to a problem? Please describe.
Tags on example tables are not picked up by the pytest_bdd_apply_tag.

i.e.

Feature: My Feature
    Scenario: My scenario case <case>
    
    Examples:
        | case |
        | 1    |
        | 2    |

    @xfail @supresswarning=DeprecationWarning
    Examples:
        | case |
        | 3    |

case 3 does get marked with xfail, but pytest_bdd_apply_tag never sees either tag.

Describe the solution you'd like
All tag locations supported by Gherkin features are intercepted by the tag hook.

Describe alternatives you've considered
Use custom tags on the entire scenario
Use @xfail and @skip tags without specifying a reason
Use request.node.add_marker() in relevent python steps that can branch on example parameters

Additional context
@skip and @xfail are working for example tables, but they and new tags can't be customised.

主要言語
Python
スター
1.5k
フォーク
251
平均マージ
43分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pytest-dev/pytest-bdd のほかの issue

pytest-dev/pytest-bdd の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。