From ee21115b23a6c0e85c6d09bb7a12078c0c0fe4cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jim=20Br=C3=A4nnlund?= Date: Sun, 10 Sep 2023 12:00:40 +0200 Subject: [PATCH] fix: Incorrect label for xfailed (#733) --- docs/changelog.rst | 7 +++++++ src/pytest_html/report_data.py | 2 +- testing/test_integration.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index c923c015..9b2c5f2a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -6,6 +6,13 @@ Versions follow `Semantic Versioning`_ (``..``). Version History --------------- +4.0.1 (2023-09-10) +~~~~~~~~~~~~~~~~~~ + +* Fix incorrectly labeled outcome. + + * Thanks to `@lodagro `_ for reporting + 4.0.0 (2023-09-01) ~~~~~~~~~~~~~~~~~~ diff --git a/src/pytest_html/report_data.py b/src/pytest_html/report_data.py index b3a70809..46225009 100644 --- a/src/pytest_html/report_data.py +++ b/src/pytest_html/report_data.py @@ -25,7 +25,7 @@ def __init__(self, config): "failed": {"label": "Failed", "value": 0}, "passed": {"label": "Passed", "value": 0}, "skipped": {"label": "Skipped", "value": 0}, - "xfailed": {"label": "Unexpected failures", "value": 0}, + "xfailed": {"label": "Expected failures", "value": 0}, "xpassed": {"label": "Unexpected passes", "value": 0}, "error": {"label": "Errors", "value": 0}, "rerun": {"label": "Reruns", "value": 0}, diff --git a/testing/test_integration.py b/testing/test_integration.py index 15a6cd0d..39b46bf0 100644 --- a/testing/test_integration.py +++ b/testing/test_integration.py @@ -20,7 +20,7 @@ "skipped": "Skipped", "failed": "Failed", "error": "Errors", - "xfailed": "Unexpected failures", + "xfailed": "Expected failures", "xpassed": "Unexpected passes", "rerun": "Reruns", }