pytest-html-plus 0.3.9__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pytest-html-plus
3
- Version: 0.3.9
4
- Summary: Auto-generated HTML reports with filters, screenshots, logs, flaky detection & more — all without writing a single line of config.
3
+ Version: 0.4.0
4
+ Summary: Plugin for Auto-generated pytest single file HTML reports with filters, screenshots, logs, flaky detection & more — all without writing a single line of config even with xdist
5
5
  License: MIT
6
6
  Keywords: pytest,pytest-html-plus,pytest-plugin,html-test-report,beautiful-test-report,shareable-test-results,test-report,test-results,unit-test-report,functional-test-report,test-summary,reporting,python-testing,automated-testing,test-runner,report-generator,continuous-integration,ci-cd,github-actions,jenkins,pytest-html,pytest-report
7
7
  Author: Emjey
@@ -25,6 +25,8 @@ Description-Content-Type: text/markdown
25
25
 
26
26
  ## Get a self-contained, actionable, easy-to-read single page HTML unified reports summarizing all your test results — no hassle, just clarity. Detect **flaky tests**, and optionally send reports via email**. Works beautifully with or without `xdist`.
27
27
 
28
+ ➡️ [View Demo Report](https://reporterplus.github.io/pytest-html-plus/)
29
+
28
30
  [![Docs](https://img.shields.io/badge/docs-online-blue)](https://pytest-html-plus.readthedocs.io/en/main/) [![PyPI Downloads](https://static.pepy.tech/badge/pytest-html-plus)](https://pepy.tech/projects/pytest-html-plus) ![PyPI](https://img.shields.io/pypi/v/pytest-html-plus) ![Python Versions](https://img.shields.io/pypi/pyversions/pytest-html-plus) ![License](https://img.shields.io/pypi/l/pytest-html-plus) [![Unit Tests](https://github.com/reach2jeyan/pytest-report-plus/actions/workflows/unit-test.yml/badge.svg)](https://github.com/reach2jeyan/pytest-report-plus/actions/workflows/unit-test.yml)
29
31
 
30
32
  [![Discord](https://img.shields.io/discord/1377581416337903646?labelColor=black&logo=discord&logoColor=c20a71&style=for-the-badge&color=c20a71)](https://discord.gg/nUNZ9crf)
@@ -55,11 +57,11 @@ No need for custom marker definitions. Perfect for smarter filtering, reporting,
55
57
 
56
58
  ![ScreenRecording2025-07-12at10 15 33PM-ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/f000388f-cdbc-418d-829b-a54309b8ffc4)
57
59
 
58
- 📦 Ship reports with provenance 📜 — full run metadata included 📋 and copy-ready.
60
+ #### 📦 Ship reports with provenance 📜 — full run metadata included 📋 and copy-ready.
59
61
 
60
62
  ![ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/fa397d22-e40b-4e4a-9321-a2e88aea1c08)
61
63
 
62
- 📋⚡ Turn failure context into a single click — copy logs, traces, and errors instantly for your team.
64
+ #### 📋⚡ Turn failure context into a single click — copy logs, traces, and errors instantly for your team.
63
65
 
64
66
  ![ezgif com-video-to-gif-converter (1)](https://github.com/user-attachments/assets/396e8cf6-862b-4619-82bf-81a8eae8e7b6)
65
67
 
@@ -3,6 +3,8 @@
3
3
 
4
4
  ## Get a self-contained, actionable, easy-to-read single page HTML unified reports summarizing all your test results — no hassle, just clarity. Detect **flaky tests**, and optionally send reports via email**. Works beautifully with or without `xdist`.
5
5
 
6
+ ➡️ [View Demo Report](https://reporterplus.github.io/pytest-html-plus/)
7
+
6
8
  [![Docs](https://img.shields.io/badge/docs-online-blue)](https://pytest-html-plus.readthedocs.io/en/main/) [![PyPI Downloads](https://static.pepy.tech/badge/pytest-html-plus)](https://pepy.tech/projects/pytest-html-plus) ![PyPI](https://img.shields.io/pypi/v/pytest-html-plus) ![Python Versions](https://img.shields.io/pypi/pyversions/pytest-html-plus) ![License](https://img.shields.io/pypi/l/pytest-html-plus) [![Unit Tests](https://github.com/reach2jeyan/pytest-report-plus/actions/workflows/unit-test.yml/badge.svg)](https://github.com/reach2jeyan/pytest-report-plus/actions/workflows/unit-test.yml)
7
9
 
8
10
  [![Discord](https://img.shields.io/discord/1377581416337903646?labelColor=black&logo=discord&logoColor=c20a71&style=for-the-badge&color=c20a71)](https://discord.gg/nUNZ9crf)
@@ -33,11 +35,11 @@ No need for custom marker definitions. Perfect for smarter filtering, reporting,
33
35
 
34
36
  ![ScreenRecording2025-07-12at10 15 33PM-ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/f000388f-cdbc-418d-829b-a54309b8ffc4)
35
37
 
36
- 📦 Ship reports with provenance 📜 — full run metadata included 📋 and copy-ready.
38
+ #### 📦 Ship reports with provenance 📜 — full run metadata included 📋 and copy-ready.
37
39
 
38
40
  ![ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/fa397d22-e40b-4e4a-9321-a2e88aea1c08)
39
41
 
40
- 📋⚡ Turn failure context into a single click — copy logs, traces, and errors instantly for your team.
42
+ #### 📋⚡ Turn failure context into a single click — copy logs, traces, and errors instantly for your team.
41
43
 
42
44
  ![ezgif com-video-to-gif-converter (1)](https://github.com/user-attachments/assets/396e8cf6-862b-4619-82bf-81a8eae8e7b6)
43
45
 
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
  name = "pytest-html-plus"
3
- version = "0.3.9"
4
- description = "Auto-generated HTML reports with filters, screenshots, logs, flaky detection & more — all without writing a single line of config."
3
+ version = "0.4.0"
4
+ description = "Plugin for Auto-generated pytest single file HTML reports with filters, screenshots, logs, flaky detection & more — all without writing a single line of config even with xdist"
5
5
  readme = "README.md"
6
6
  authors = ["Emjey", "Karan"]
7
7
  license = "MIT"
@@ -40,21 +40,19 @@ python = ">=3.9,<4.0"
40
40
  yagmail = ">=0.15.293,<0.16.0"
41
41
  keyring = ">=25.6.0,<26.0.0"
42
42
 
43
- [tool.poetry.dev-dependencies]
43
+ [tool.poetry.group.dev.dependencies]
44
+ pytest-rerunfailures = "^15.1"
44
45
  pytest = "^8.4.1"
45
46
  pytest-cov = "^6.2.1"
46
47
  playwright = "^1.53.0"
47
48
  pytest-playwright = "^0.7.0"
48
49
  pytest-xdist = "^3.8.0"
49
50
 
50
- [tool.poetry.group.dev.dependencies]
51
- pytest-rerunfailures = "^15.1"
52
-
53
51
  [build-system]
54
52
  requires = ["poetry-core"]
55
53
  build-backend = "poetry.core.masonry.api"
56
54
 
57
55
  [tool.poetry.plugins."pytest11"]
58
- pytest_reporter_plus = "pytest_html_plus.plugin"
56
+ pytest_html_plus = "pytest_html_plus.plugin"
59
57
 
60
58
 
@@ -1,7 +1,8 @@
1
1
  import json
2
2
  from datetime import datetime
3
3
 
4
- from pytest_html_plus.utils import is_main_worker, get_env_marker, get_git_branch, get_git_commit, get_report_title
4
+ from pytest_html_plus.utils import is_main_worker, get_env_marker, get_git_branch, get_git_commit, get_report_title, \
5
+ get_python_version
5
6
 
6
7
 
7
8
  def write_plus_metadata_if_main_worker(config, report_path, output_path="plus_metadata.json"):
@@ -12,6 +13,7 @@ def write_plus_metadata_if_main_worker(config, report_path, output_path="plus_me
12
13
  "environment": get_env_marker(config),
13
14
  "branch": get_git_branch(),
14
15
  "commit": get_git_commit(),
16
+ "python_version": get_python_version(),
15
17
  "generated_at": datetime.now().isoformat()
16
18
  }
17
19
  with open(output_path, "w") as f:
@@ -553,6 +553,7 @@ class JSONReporter:
553
553
  <tr><th>Branch</th><td>{self.metadata.get('branch', '')}</td></tr>
554
554
  <tr><th>Commit</th><td>{self.metadata.get('commit', '')}</td></tr>
555
555
  <tr><th>Generated At</th><td>{self.metadata.get('generated_at', '')}</td></tr>
556
+ <tr><th>Python version</th><td>{self.metadata.get('python_version', '')}</td></tr>
556
557
  </table>
557
558
  </div>
558
559
  <div id="fullscreen-overlay" class="fullscreen-overlay" onclick="closeFullscreen()"></div>
@@ -1,4 +1,8 @@
1
+ import platform
1
2
  import subprocess
3
+ import shutil
4
+ import os
5
+
2
6
 
3
7
  def get_git_commit():
4
8
  try:
@@ -62,11 +66,6 @@ def extract_error_block(error: str) -> str:
62
66
  except Exception as e:
63
67
  return f"[Error extracting error block: {e}]"
64
68
 
65
-
66
- import shutil
67
- import os
68
-
69
-
70
69
  def zip_report_folder(report_path: str, output_zip: str = "report.zip") -> str:
71
70
  """Zips the given report folder into a zip file."""
72
71
  if not os.path.exists(report_path):
@@ -90,3 +89,9 @@ def load_email_env(filepath="emailenv"):
90
89
 
91
90
  def is_main_worker():
92
91
  return os.environ.get("PYTEST_XDIST_WORKER") in (None, "gw0")
92
+
93
+ def get_python_version():
94
+ try:
95
+ return platform.python_version()
96
+ except Exception:
97
+ return "NA"