Incompatible with pytest-timeout plugin
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- testing-qa
調査の方向性
まず、提供された pytester の再現を pytest-rerunfailures と pytest-timeout で実行し、次に、再実行に関係する plugin の pytest hook の処理を調査します。再実行時にも timeout が再度適用され、再現結果で再実行が 1 回、失敗したテストが 1 件報告されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
pytest-rerunfailures is not compatible with the pytest-timeout plugin.
Probably b/c the same pytest hooks are used. The first time, the timeout is observed, but when the test case re-runs, there's no timeout.
pytest-timeoutis more widely used and likely would be easier for the fix to be in this plugin if possible..
Here's a test that fails:
import pytest
pytest_plugins = 'pytester'
def test_pytest_timeout_compatibility_fails(testdir):
"""
Verifies the `pytest-rerunfailures` plugin is compatible with `pytest-timeout`
plugin when the test case is not done in the allotted time.
"""
testdir.makepyfile(
"""
import time
import pytest
@pytest.mark.flaky
@pytest.mark.timeout(timeout=1)
def test_times_out():
time.sleep(2)
assert True
"""
)
result = testdir.runpytest()
outcome = result.parseoutcomes()
assert outcome.get('rerun') == 1
assert outcome.get('failed') == 1
When the test case re-runs, it ignores the timeout and passes.
Note: doesn't matter which decorator comes first (flaky or timeout), the behavior is the same.
- 主要言語
- Python
- スター
- 481
- フォーク
- 110
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytest-dev/pytest-rerunfailures のほかの issue
-
Zero rerun delay can abort with OverflowError for a large finite backoff factor対応中かも @AryanRG が 16 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Non-finite rerun delay settings abort pytest with INTERNALERROR対応中かも @Arham-Begani が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
-
fail-on-flaky returns success after a rerun with xdist対応中かも @harbinresearcher が 17 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
pytest-dev/pytest-rerunfailures#326 · コメント 7 件 ·
-
Add ability to raise runtime warnings on reruns対応中かも @LouisDeconinck が 45 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
pytest-dev/pytest-rerunfailures#318 · コメント 2 件 ·
pytest-dev/pytest-rerunfailures の issue をすべて見る
似ている issue
-
area:scripts area:tests bug priority:later
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Ikalus1988/MisakaNet#4358 ·
メンテナーはふだん 1 日以内に返信
-
Discovered ports from service discovery are never propagated to modules in Module.load()対応中かも @vishalmore90 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
OWASP/Nettacker#1828 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
aws-samples/sample-per-model-bedrock#708 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sjkim1127/Reversecore_MCP#365 ·
メンテナーはふだん 1 日以内に返信