Using frame inspection to obtain feature file path is unreliable
まだ誰も着手していません。
評価
調査の方向性
まず、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
環境構築
はじめの一歩
- 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
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openvinotoolkit/openvino_notebooks#3665 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
docs
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
benchmark-gap
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信