Non-finite rerun delay settings abort pytest with INTERNALERROR
評価
調査の方向性
Start at the rerun delay and backoff settings used by the CLI, ini configuration, and flaky markers; the report provides reproductions for each input path. Run the four commands in the issue to observe the INTERNALERROR, then add regression coverage for non-finite values and verify they warn and fall back to 0 / 1.0 while finite values retain their behavior. A linked pull request is already open.
索引モデルが issue の本文から書いたものです。
説明
Reproduction
On master 01fd226bd533ecd7f6aabe7c155c4ca7bcd8598c, Windows / CPython 3.13.15 / pytest 9.1.1:
# test_recovery.py
def test_recovery(request):
assert request.node.execution_count == 3
python -m pytest -q --reruns 2 --reruns-delay=nan test_recovery.py
python -m pytest -q --reruns 2 --reruns-delay=inf test_recovery.py
python -m pytest -q --reruns 2 --reruns-delay-backoff-factor=nan test_recovery.py
python -m pytest -q --reruns 2 --reruns-delay-backoff-factor=inf test_recovery.py
All four commands exit with code 3 / INTERNALERROR in time.sleep. NaN produces ValueError; positive-infinite delay produces OverflowError; an infinite backoff factor with the default zero delay produces NaN on the second rerun. These runs use real sleep calls. The same non-finite values can also come from ini settings and flaky marker arguments.
Expected behavior / proposed fix
Validate that the configured delay and backoff factor are finite before using them, warn, and fall back to 0 / 1.0 respectively. This follows the existing handling of negative values. Negative values (including negative infinity) would keep their current warning and defaults. Valid finite settings would retain their current behavior.
I have a focused patch in progress with regression coverage for CLI, ini, keyword markers and positional markers.
This concerns explicit NaN/infinite configuration, which is separate from #388 / #389's overflow during exponentiation of a large finite factor. The proposed patch does not change the retry formula or duplicate that implementation.
AI assistance disclosure: an AI coding assistant performed this investigation and drafted this report with the account owner's authorization.
- 主要言語
- Python
- スター
- 480
- フォーク
- 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 が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
fail-on-flaky returns success after a rerun with xdist対応中かも @harbinresearcher が 13 日前に担当しました。 オープン
難易度 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 が 41 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
pytest-dev/pytest-rerunfailures#318 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
pytest-dev/pytest-rerunfailures#313 · コメント 5 件 ·
pytest-dev/pytest-rerunfailures の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistencies対応中かも @github-actions が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
admission-deferred priority: medium status: ready work-class: scoped
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
melodic-software/claude-code-plugins#10887 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
backend bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
PoCInnovation/Distribox#255 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
google/langextract#598 ·
メンテナーはふだん 1 日以内に返信