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

[question] step arguments in code generation

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

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

評価

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

調査の方向性

pytest-bdd generate コマンドと、Scenario Outline のステップを処理する feature 生成パスから始めます。 に対して現在生成される出力を、要求されたパース済み引数およびパラメータ化された関数と比較し、生成されたステップ引数が示されている例で使用できることを確認します。

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

説明

Is your feature request related to a problem? Please describe.

During code generation pytest-bdd generate ... of a feature, the step arguments are not parsed properly.

Is this the intended behaviour, or should I expect a smarter code generation?

Describe the solution you'd like

It would be nice to have the step arguments parsed properly, e.g.

Feature: comparison

  Scenario Outline: check less than
    Given a value of <value>
    When I have a value of 3
    Then no error should be raised

    Examples:
      | value |
      | 2     |
      | 1     |
      | 0     |

this generates:

...
@given('a value of <value>')
def _():
    """a value of <value>."""
    raise NotImplementedError

I'd expect this to generate something like:

@given(parsers.parse("a value of {value}"))
def given_a_value(value):
    """Given a value of <value>.
    `value` ...
    """
    raise NotImplementedError

Describe alternatives you've considered

Manual, but that's very cumbersome.

主要言語
Python
スター
1.5k
フォーク
251
平均マージ
3時間 41分
マージ済み PR(30日)
4

環境構築

はじめの一歩

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

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

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

似ている issue

Python の issue をもっと見る

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

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