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

pytest-html version 3.1.1 bug- Internal error in pytest_runtest_makereport causes test to show as Passed in HTML report

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

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
html, python
領域
testing-qa

調査の方向性

pytest-html 3.1.1、pytest、--html=report.html、および pytest_runtest_makereport フック内での例外またはキーボード割り込みを使って、まず問題を再現します。フックの結果が HTML レポートに到達するまでの流れを追跡し、影響を受けたテストが Passed として表示されないことを確認します。ERROR と FAILED のどちらを意図した結果とするかは、まだ解決する必要があります。

索引モデルが issue の本文から書いたものです。

説明

Description

When an internal error occurs inside the pytest_runtest_makereport hook,
pytest-html 3.1.1 does not receive a valid report outcome and silently
defaults to displaying the test as Passed in the HTML report.

Environment

  • pytest-html: 3.1.1
  • pytest: 7.1.2 or 9.0.3
  • Python: 3.13.7
  • OS: Windows

Expected Behavior

Test should be marked as ERROR in the HTML report.

Actual Behavior

Test is marked as Passed in the HTML report, giving a false green result.

Steps to Reproduce

  1. Trigger an exception inside pytest_runtest_makereport hook for eg raise RuntimeError("BOOM")
  2. Run pytest with --html=report.html
  3. Open the HTML report
  4. Observe the affected test shows as Passed

Additional Notes

pytest-html 4.2.0 handles this differently — the report is empty instead
of showing a false Passed — but neither behavior is correct.
the correct expected outcome is debatable:
ERROR — represents a framework/fixture level problem, not a test assertion failure. This is probably the most accurate.
FAILED — could argue this since something clearly went wrong.
At minimum — not Passed, since that's factually wrong.
-In case of keyboard interrupt too same issue

主要言語
Python
スター
779
フォーク
259
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

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

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

似ている issue

Python の issue をもっと見る

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

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