Skip to content

Commit dda6757

Browse files
committed
Initial backend
1 parent 0f7a9e2 commit dda6757

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

nextgendata.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ build-backend = "setuptools.build_meta"
1111
[tool.setuptools_scm]
1212
local_scheme = "no-local-version"
1313
write_to = "src/pytest_html/__version.py"
14+

resources/nextgendata.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pytest_html/nextgen.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ def pytest_runtest_logreport(self, report):
5050
data = self._config.hook.pytest_report_to_serializable(
5151
config=self._config, report=report
5252
)
53+
# rename to "extras" since list
54+
if hasattr(report, "extra"):
55+
for extra in report.extra:
56+
print(extra)
57+
if extra["mime_type"] is not None and "image" in extra["mime_type"]:
58+
data.update({"extras": extra})
5359
self._data["tests"].append(data)
5460
self._write()
5561

src/pytest_html/plugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,6 @@ def _post_process_reports(self):
737737
test_report.longrepr = full_text
738738
test_report.extra = extras
739739
test_report.duration = duration
740-
741740
if wasxfail:
742741
test_report.wasxfail = True
743742

0 commit comments

Comments
 (0)