How to customize auto-generated test name when using Scenario Outline?
まだ誰も着手していません。
評価
調査の方向性
@scenario の使用箇所と executed.feature から始め、Scenario Outline Examples の行がどのように pytest のテスト名になるかを追跡します。プロジェクトが、サポート対象の命名フックまたは設定ポイントを公開しているかを確認します。compare、seconds、name の提示された値をカバーし、生成される名前をカスタマイズする方法が文書化されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
First things first, thanks to everybody involved for creating such a useful module, I'm loving it. It took some time getting used to but now I feel like I'm flying.
Now the question: How to customize auto-generated test name when using Scenario Outline?
I have a test scenario where I'm using data
compare = [<, =, >]
name = [RISING, FALLING, NONE]
seconds= [0.0, 1.0]
that forms a Examples: table:
Examples:
| compare | seconds | name |
| < | 0 | NONE |
| < | 1 | NONE |
| = | 0 | NONE |
| = | 1 | NONE |
| > | 0 | NONE |
| > | 1 | NONE |
| = | 0 | RISING |
...
for this
@scenario('executed.feature', 'Scenario becoming true',
example_converters=dict(compare=str, seconds=float, name=str))
def test_scenario_never_becomes_true():
pass
and the output looks like

I've tried searching for pytest hook where I could get the test and generate a new name for it but didn't manage to find anything.
- 主要言語
- Python
- スター
- 1.5k
- フォーク
- 251
- 平均マージ
- 3時間 41分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytest-dev/pytest-bdd のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pytest-dev/pytest-bdd#838 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
pytest-dev/pytest-bdd#805 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
pytest-dev/pytest-bdd#785 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
pytest-dev/pytest-bdd#784 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
pytest-dev/pytest-bdd#782 ·
pytest-dev/pytest-bdd の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
sierra-research/tau2-bench#635 ·
メンテナーはふだん 1 日以内に返信
-
The add-ssm-model skill requires a Cython simulator; the contributing guide allows Python ones対応中かも @fmuia が今日担当しました。 オープンdocumentation skill
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
lnccbrown/ssm-simulators#406 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
btclib-org/btclib-ecc#309 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
jbacalso24/mimry#459 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] POST /revoke with a FastMCP access token is a silent no-op (ownership gate never matches)オープンauth bug high-priority
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信