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

Using frame inspection to obtain feature file path is unreliable

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
testing

調査の方向性

まず、pytest-bdd のフレーム検査と、pytest の assert-rewritten module cache が feature ファイルのパスをどのように提供しているかを追跡します。/projects/my-project/tests 配下でテストを実行し、次に /app/my-project にマウントした Docker コンテナ内で実行して、失敗を再現します。キャッシュされたメタデータによって pytest-bdd が古いパスに送られなくなり、FileNotFoundError が回避されれば完了です。

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

説明

Pytest-bdd uses frame inspection to obtain the path to its feature file. This in unreliable because

Pytest performs assert rewriting, and caches the rewritten modules. If I run pytest-bdd on my local system, where my tests are in "/projects/my-project/tests", then the cached rewritten modules will end up containing this path in their metadata.

If I then spin up a docker container, with my project mounted as "/app/my-project", then when I run my tests, pytest will load the cached rewritten modules, and the metadata will be wrong. This usually doesn't matter, but it matters to pytest-bdd, because pytest-bdd will get the wrong path, and go looking for its feature file in "/projects/my-project/tests/....", and crash with a FileNotFoundError.

主要言語
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 を短くまとめたダイジェスト。