pytest-html version 3.1.1 bug- Internal error in pytest_runtest_makereport causes test to show as Passed in HTML report
まだ誰も着手していません。
評価
- 難易度
- 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
- Trigger an exception inside
pytest_runtest_makereporthook for eg raise RuntimeError("BOOM") - Run pytest with
--html=report.html - Open the HTML report
- 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytest-dev/pytest-html のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
pytest-dev/pytest-html#1077 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
pytest-dev/pytest-html#1039 ·
-
Feature: pluggable HTML themes via Jinja2 template inheritance対応中かも @RonnyPfannschmidt が 137 日前に担当しました。 オープン
pytest-dev/pytest-html#1029 · リアクション 1 件 · 担当者 1 名 ·
-
pytest-html does not escape HTML in testId (v4.2.0)対応中かも @golikovichev が 121 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
pytest-dev/pytest-html#1024 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
pytest-dev/pytest-html#1010 ·
pytest-dev/pytest-html の issue をすべて見る
似ている issue
-
docs(types): update the collection binding note now that typed collections shipped in pycubrid 1.9.0オープンdocumentation priority: low size: S
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cubrid-lab/sqlalchemy-cubrid#768 ·
メンテナーはふだん 1 日以内に返信
-
bug help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
ansys/pydpf-core#3547 ·
メンテナーはふだん 1 日以内に返信
-
core
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
vectorize-io/hindsight#5457 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: LangChain drops OpenAI Responses text blocks from session recording対応中かも @ktz03 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
volcengine/OpenViking#5806 ·
メンテナーはふだん 1 日以内に返信