Rewrite pytest-bdd to use hooks and marks
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
まず issue #296 と、そこからリンクされている marks と hooks に関する pytest のドキュメントを読み、次に issue に示されている現在の pytest-bdd デコレーターと提案された API を比較します。リライトによって既存の機能を維持できるかを判断し、@scenario mark の役割を決定します。合意された設計と実装計画ができれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Following the suggestion from issue #296, I will try to re-implement pytest-bdd to use marks and hooks.
I imagine an API that will look like this:
# test_some_scenario.py
pytestmark = pytest.mark.scenarios('a.feature')
# override "Scenario 3"
@pytest.mark.scenario('a.feature', 'Scenario 3')
def test_a_scenario(...):
# do something more
pass
instead of the current way:
import pytest_bdd
# override "Scenario 3"
@pytest_bdd.scenario('a.feature', 'Scenario 3')
def test_a_scenario(...):
# do something more
pass
scenarios('a.feature')
I yet don't know if this is entirely feasible without breaking other features, but we will see.
Short note about @scenario(...)
Potentially, I will also remove the single scenario mark/decorator, given that the only thing it allows to do is to require some more fixtures before the scenario is run, and to execute some more logic after the scenario finished.
This custom logic can already be implemented using given and then steps, but I understand that sometimes it can be just some compensation logic that should not appear in the feature file.
I still didn't figure out what to do with this, so probably I'll keep the @scenario mark/decorator for the time being.
@bubenkoff @olegpidsadnyi @sliwinski-milosz: Feedback on this idea would be appreciated.
- 主要言語
- Python
- スター
- 1.5k
- フォーク
- 251
- 平均マージ
- 43分
- マージ済み PR(30日)
- 2
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytest-dev/pytest-bdd のほかの issue
-
難易度 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 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
pytest-dev/pytest-bdd#780 · リアクション 3 件 ·
pytest-dev/pytest-bdd の issue をすべて見る
似ている issue
-
correction metadata
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
acl-org/acl-anthology#10104 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug status/needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
prowler-cloud/prowler#12885 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug in GaussianTailProbabilityCalibrator: running_statistics=False still uses a windowed varianceオープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
selimfirat/pysad#107 ·
メンテナーはふだん 1 日以内に返信
-
bug ci-failure high priority
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
vllm-project/vllm-omni#8194 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信