pytest-html-plus 1.3.0__tar.gz → 1.3.1__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.
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/PKG-INFO +1 -1
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pyproject.toml +1 -1
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/plugin.py +19 -3
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/LICENSE +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/README.md +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/__init__.py +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/compute_filter_counts.py +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/compute_report_metadata.py +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/extract_link.py +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/generate_html_report.py +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/json_merge.py +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/json_to_xml_converter.py +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/resolver_driver.py +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/send_email_report.py +0 -0
- {pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-html-plus
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.1
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pytest-html-plus"
|
|
3
|
-
version = "1.3.
|
|
3
|
+
version = "1.3.1"
|
|
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"]
|
|
@@ -33,6 +33,8 @@ PROFILE_OPTION = "--plus-profile"
|
|
|
33
33
|
PROFILE_SECTION = ("tool", "pytest-html-plus", "profiles")
|
|
34
34
|
OUTPUT_OPTION = "--plus-output"
|
|
35
35
|
OUTPUT_CHOICES = ("all", "failed-only", "none")
|
|
36
|
+
WORKER_JSON_DIR_OPTION = "--worker-json-dir"
|
|
37
|
+
DEFAULT_WORKER_JSON_DIR = ".pytest_worker_jsons"
|
|
36
38
|
PROFILE_OPTION_MAP = {
|
|
37
39
|
"json-report": {"flag": "--json-report", "kind": "value"},
|
|
38
40
|
"capture-screenshots": {"flag": "--capture-screenshots", "kind": "value"},
|
|
@@ -46,6 +48,7 @@ PROFILE_OPTION_MAP = {
|
|
|
46
48
|
"git-commit": {"flag": "--git-commit", "kind": "value"},
|
|
47
49
|
"rp-env": {"flag": "--rp-env", "kind": "value"},
|
|
48
50
|
"output": {"flag": OUTPUT_OPTION, "kind": "value"},
|
|
51
|
+
"worker-json-dir": {"flag": WORKER_JSON_DIR_OPTION, "kind": "value"},
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
|
|
@@ -287,6 +290,9 @@ def pytest_sessionfinish(session, exitstatus):
|
|
|
287
290
|
html_output = session.config.getoption("--html-output") or "report_output"
|
|
288
291
|
screenshots_path = session.config.getoption("--screenshots") or "screenshots"
|
|
289
292
|
raw_xml_report = session.config.getoption("--xml-report")
|
|
293
|
+
worker_dir = (
|
|
294
|
+
session.config.getoption(WORKER_JSON_DIR_OPTION) or DEFAULT_WORKER_JSON_DIR
|
|
295
|
+
)
|
|
290
296
|
|
|
291
297
|
# ---- XML filename validation ----
|
|
292
298
|
if raw_xml_report:
|
|
@@ -320,7 +326,6 @@ def pytest_sessionfinish(session, exitstatus):
|
|
|
320
326
|
# ---- Worker behavior ----
|
|
321
327
|
if is_worker:
|
|
322
328
|
worker_id = os.getenv("PYTEST_XDIST_WORKER")
|
|
323
|
-
worker_dir = ".pytest_worker_jsons"
|
|
324
329
|
os.makedirs(worker_dir, exist_ok=True)
|
|
325
330
|
|
|
326
331
|
reporter.report_path = os.path.join(worker_dir, f"{worker_id}.json")
|
|
@@ -334,7 +339,7 @@ def pytest_sessionfinish(session, exitstatus):
|
|
|
334
339
|
|
|
335
340
|
# Always run merge (even for single worker)
|
|
336
341
|
merge_json_reports(
|
|
337
|
-
directory=
|
|
342
|
+
directory=worker_dir if is_xdist else html_output,
|
|
338
343
|
output_path=json_path,
|
|
339
344
|
)
|
|
340
345
|
|
|
@@ -462,6 +467,15 @@ def pytest_addoption(parser):
|
|
|
462
467
|
)
|
|
463
468
|
group.addoption("--html-output", default="report_output")
|
|
464
469
|
group.addoption("--screenshots", default="screenshots")
|
|
470
|
+
group.addoption(
|
|
471
|
+
WORKER_JSON_DIR_OPTION,
|
|
472
|
+
action="store",
|
|
473
|
+
default=DEFAULT_WORKER_JSON_DIR,
|
|
474
|
+
help=(
|
|
475
|
+
"Directory where pytest-xdist workers write their partial JSON "
|
|
476
|
+
"reports before merging (default: .pytest_worker_jsons)"
|
|
477
|
+
),
|
|
478
|
+
)
|
|
465
479
|
group.addoption(
|
|
466
480
|
"--plus-email",
|
|
467
481
|
action="store_true",
|
|
@@ -523,7 +537,9 @@ def pytest_configure(config):
|
|
|
523
537
|
global _saved_config
|
|
524
538
|
_saved_config = config
|
|
525
539
|
|
|
526
|
-
INTERNAL_JSON_DIR = Path(
|
|
540
|
+
INTERNAL_JSON_DIR = Path(
|
|
541
|
+
config.getoption(WORKER_JSON_DIR_OPTION) or DEFAULT_WORKER_JSON_DIR
|
|
542
|
+
)
|
|
527
543
|
report_path = config.getoption("--json-report") or "final_report.json"
|
|
528
544
|
worker_id = os.getenv("PYTEST_XDIST_WORKER")
|
|
529
545
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_html_plus-1.3.0 → pytest_html_plus-1.3.1}/pytest_html_plus/compute_report_metadata.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|