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

Non-finite rerun delay settings abort pytest with INTERNALERROR

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

@Arham-Begani がすでに取り組んでいます。

2026年10月18日 から。

  • #391 @Arham-Begani による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
testing

調査の方向性

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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pytest-dev/pytest-rerunfailures のほかの issue

pytest-dev/pytest-rerunfailures の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。