Flaky reruns autouse session-scoped fixtures when a tests fails one of its runs
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- testing-qa
調査の方向性
提供された pytest fixture と flaky test で問題を再現し、その後、plugin の rerun 処理と fixture のセットアップ動作を調査してください。session スコープの autouse fixture が rerun 全体を通して 1 回だけ実行される一方で、flaky test が以前の trace ファイルを削除せずに設定された実行回数を完了することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
When a test fails and is rerun, Flaky reruns session-scoped autouse fixtures. For example, running this test:
import pytest
@pytest.fixture(scope="session", autouse=True)
def my_session_scoped_autouse_fixture():
print("\nIn session scope autouse fixture")
@pytest.mark.flaky(max_runs=3)
def test_flaky_reruns(local_list = []):
local_list.append(0)
assert len(local_list)==3
calls the fixture 3 times:
============================= test session starts ==============================
collecting ... collected 1 item
test_it.py::test_flaky_reruns
In session scope autouse fixture
In session scope autouse fixture
In session scope autouse fixture
PASSED
============================== 1 passed in 0.01s ===============================
Process finished with exit code 0
This can cause unexpected behaviors. In my case, I'm using the pytest-playwright package which has a session-scoped autouse fixture that deletes the output directory where traces are stored for failing tests. If a test fails and is rerun, any previously created trace files are deleted.
- 主要言語
- Python
- スター
- 399
- フォーク
- 58
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
box/flaky のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
似ている issue
-
binding:python bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
The Browser tab fails with a Wayland error when Open Terminal runs from a Wayland desktop sessionオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
open-webui/open-terminal#210 ·
-
triage/confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agentscope-ai/agentscope#3807 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#150542 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
triton-inference-server/server#9069 ·
メンテナーはふだん 1 日以内に返信