pytest-html-plus 1.1.0__tar.gz → 1.2.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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-html-plus
3
- Version: 1.1.0
3
+ Version: 1.2.0
4
4
  Summary: Generate Actionable, automatic screenshots, unified Mobile friendly Pytest HTML report in less than 3 seconds — no hooks, merge plugins, no config, xdist-ready.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -156,7 +156,7 @@ Just start typing, and the dashboard will instantly filter tests by:
156
156
 
157
157
  ![ScreenRecording2025-06-21at2 52 49PM-ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/b9760927-7c67-4bbf-b03d-e13964c727ee)
158
158
 
159
- #### 📝 Comprehensive output capture: All your test logs with loggers, print() statements, and screenshots are automatically captured and embedded in the report...
159
+ #### 📝 Configurable output capture: Test logs, print() statements, stdout/stderr, and screenshots are automatically captured and embedded in the report. Use `--plus-output=failed-only` to omit captured stdout/stderr from passing tests and reduce report size; logger and screenshot behavior is unchanged.
160
160
 
161
161
  ![ezgif-744a5d34a4c46d](https://github.com/user-attachments/assets/209cd2c0-d33b-48ec-b58b-8c8991ce35be)
162
162
 
@@ -174,7 +174,7 @@ Just start typing, and the dashboard will instantly filter tests by:
174
174
  | 🐢 **Slow test highlighting** | Slowest tests in the run automatically flagged |
175
175
  | 📋 **Copy-to-clipboard** | Copy test path, logs, trace, and errors in one click |
176
176
  | 📦 **Run metadata** | Branch, commit SHA, environment, and custom metadata embedded in the report header |
177
- | 📝 **Comprehensive log capture** | `print()`, logger output, and stdout/stderr automatically captured per test |
177
+ | 📝 **Configurable stream capture** | Control captured stdout/stderr with `--plus-output`; logger and screenshot behavior remains unchanged |
178
178
  | ⚡ **xdist support** | Parallel runs with `pytest-xdist` produce a single merged report, no extra steps |
179
179
  | 🌐 **Auto-open report** | `--should-open-report` opens the report in your browser after a run (always / failed / never) |
180
180
  | 📄 **JSON report** | Raw JSON output (`--json-report`) for custom dashboards or post-processing |
@@ -199,6 +199,14 @@ This plugin is aimed at those who are:
199
199
 
200
200
  - Want "just enough" — not bare-bones plain text, not a full dashboard with database setup — just a portable HTML report that STILL supports features like links, screenshots, and markers.
201
201
 
202
+ ## Project Status
203
+
204
+ pytest-html-plus is stable and actively maintained, with its core reporting experience now well established. Future development will prioritize compatibility, reliability, bug fixes, and thoughtfully selected enhancements.
205
+
206
+ We're also looking for co-maintainers to help review pull requests, triage issues, and keep the project healthy across future Python and pytest releases.
207
+
208
+ If you're interested in becoming a long-term contributor, we'd love to hear from you. Please open an issue or start a discussion.
209
+
202
210
  ## Contributing
203
211
 
204
212
  We welcome pull requests, issues, and feature suggestions from the community.
@@ -123,7 +123,7 @@ Just start typing, and the dashboard will instantly filter tests by:
123
123
 
124
124
  ![ScreenRecording2025-06-21at2 52 49PM-ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/b9760927-7c67-4bbf-b03d-e13964c727ee)
125
125
 
126
- #### 📝 Comprehensive output capture: All your test logs with loggers, print() statements, and screenshots are automatically captured and embedded in the report...
126
+ #### 📝 Configurable output capture: Test logs, print() statements, stdout/stderr, and screenshots are automatically captured and embedded in the report. Use `--plus-output=failed-only` to omit captured stdout/stderr from passing tests and reduce report size; logger and screenshot behavior is unchanged.
127
127
 
128
128
  ![ezgif-744a5d34a4c46d](https://github.com/user-attachments/assets/209cd2c0-d33b-48ec-b58b-8c8991ce35be)
129
129
 
@@ -141,7 +141,7 @@ Just start typing, and the dashboard will instantly filter tests by:
141
141
  | 🐢 **Slow test highlighting** | Slowest tests in the run automatically flagged |
142
142
  | 📋 **Copy-to-clipboard** | Copy test path, logs, trace, and errors in one click |
143
143
  | 📦 **Run metadata** | Branch, commit SHA, environment, and custom metadata embedded in the report header |
144
- | 📝 **Comprehensive log capture** | `print()`, logger output, and stdout/stderr automatically captured per test |
144
+ | 📝 **Configurable stream capture** | Control captured stdout/stderr with `--plus-output`; logger and screenshot behavior remains unchanged |
145
145
  | ⚡ **xdist support** | Parallel runs with `pytest-xdist` produce a single merged report, no extra steps |
146
146
  | 🌐 **Auto-open report** | `--should-open-report` opens the report in your browser after a run (always / failed / never) |
147
147
  | 📄 **JSON report** | Raw JSON output (`--json-report`) for custom dashboards or post-processing |
@@ -166,6 +166,14 @@ This plugin is aimed at those who are:
166
166
 
167
167
  - Want "just enough" — not bare-bones plain text, not a full dashboard with database setup — just a portable HTML report that STILL supports features like links, screenshots, and markers.
168
168
 
169
+ ## Project Status
170
+
171
+ pytest-html-plus is stable and actively maintained, with its core reporting experience now well established. Future development will prioritize compatibility, reliability, bug fixes, and thoughtfully selected enhancements.
172
+
173
+ We're also looking for co-maintainers to help review pull requests, triage issues, and keep the project healthy across future Python and pytest releases.
174
+
175
+ If you're interested in becoming a long-term contributor, we'd love to hear from you. Please open an issue or start a discussion.
176
+
169
177
  ## Contributing
170
178
 
171
179
  We welcome pull requests, issues, and feature suggestions from the community.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pytest-html-plus"
3
- version = "1.1.0"
3
+ version = "1.2.0"
4
4
  description = "Generate Actionable, automatic screenshots, unified Mobile friendly Pytest HTML report in less than 3 seconds — no hooks, merge plugins, no config, xdist-ready."
5
5
  readme = "README.md"
6
6
  authors = ["reporterplus"]
@@ -31,6 +31,8 @@ python_executable = shutil.which("python3") or shutil.which("python")
31
31
  test_screenshot_paths = {}
32
32
  PROFILE_OPTION = "--plus-profile"
33
33
  PROFILE_SECTION = ("tool", "pytest-html-plus", "profiles")
34
+ OUTPUT_OPTION = "--plus-output"
35
+ OUTPUT_CHOICES = ("all", "failed-only", "none")
34
36
  PROFILE_OPTION_MAP = {
35
37
  "json-report": {"flag": "--json-report", "kind": "value"},
36
38
  "capture-screenshots": {"flag": "--capture-screenshots", "kind": "value"},
@@ -43,6 +45,7 @@ PROFILE_OPTION_MAP = {
43
45
  "git-branch": {"flag": "--git-branch", "kind": "value"},
44
46
  "git-commit": {"flag": "--git-commit", "kind": "value"},
45
47
  "rp-env": {"flag": "--rp-env", "kind": "value"},
48
+ "output": {"flag": OUTPUT_OPTION, "kind": "value"},
46
49
  }
47
50
 
48
51
 
@@ -250,6 +253,15 @@ def pytest_runtest_makereport(item, call):
250
253
  if report.when in ("setup", "teardown") and report.failed:
251
254
  status = "error"
252
255
 
256
+ output_policy = config.getoption(OUTPUT_OPTION)
257
+ is_expected_failure = report.skipped and hasattr(report, "wasxfail")
258
+ include_output = output_policy == "all" or (
259
+ output_policy == "failed-only"
260
+ and (report.failed or is_expected_failure)
261
+ )
262
+ stdout = getattr(report, "capstdout", "") if include_output else ""
263
+ stderr = getattr(report, "capstderr", "") if include_output else ""
264
+
253
265
  reporter.log_result(
254
266
  test_name=test_name,
255
267
  nodeid=item.nodeid,
@@ -261,8 +273,8 @@ def pytest_runtest_makereport(item, call):
261
273
  markers=[m.name for m in item.iter_markers()],
262
274
  filepath=item.location[0],
263
275
  lineno=item.location[1],
264
- stdout=getattr(report, "capstdout", ""),
265
- stderr=getattr(report, "capstderr", ""),
276
+ stdout=stdout,
277
+ stderr=stderr,
266
278
  screenshot=screenshot_path,
267
279
  logs=caplog_text,
268
280
  worker=worker_id,
@@ -440,6 +452,16 @@ def pytest_addoption(parser):
440
452
  choices=["failed", "all", "none"],
441
453
  help="Capture screenshots: failed (default), all, or none",
442
454
  )
455
+ group.addoption(
456
+ OUTPUT_OPTION,
457
+ action="store",
458
+ default="all",
459
+ choices=OUTPUT_CHOICES,
460
+ help=(
461
+ "Include captured stdout/stderr in reports: all (default), "
462
+ "failed-only, or none"
463
+ ),
464
+ )
443
465
  group.addoption("--html-output", default="report_output")
444
466
  group.addoption("--screenshots", default="screenshots")
445
467
  group.addoption(