Initial backend
This commit is contained in:
parent
0f7a9e2ba5
commit
dda67575cf
File diff suppressed because one or more lines are too long
|
@ -11,3 +11,4 @@ build-backend = "setuptools.build_meta"
|
||||||
[tool.setuptools_scm]
|
[tool.setuptools_scm]
|
||||||
local_scheme = "no-local-version"
|
local_scheme = "no-local-version"
|
||||||
write_to = "src/pytest_html/__version.py"
|
write_to = "src/pytest_html/__version.py"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
const jsonData = {"title": "Next Gen Report", "collectedItems": 89, "environment": {"Python": "3.7.7", "Platform": "Darwin-19.6.0-x86_64-i386-64bit", "Packages": {"pytest": "6.1.2", "py": "1.10.0", "pluggy": "0.13.1"}, "Plugins": {"rerunfailures": "9.1.1", "metadata": "1.11.0", "xdist": "2.1.0", "mock": "3.3.1", "html": "2.1.2.dev80", "forked": "1.3.0"}}, "tests": []}
|
|
@ -50,6 +50,12 @@ class NextGenReport:
|
||||||
data = self._config.hook.pytest_report_to_serializable(
|
data = self._config.hook.pytest_report_to_serializable(
|
||||||
config=self._config, report=report
|
config=self._config, report=report
|
||||||
)
|
)
|
||||||
|
# rename to "extras" since list
|
||||||
|
if hasattr(report, "extra"):
|
||||||
|
for extra in report.extra:
|
||||||
|
print(extra)
|
||||||
|
if extra["mime_type"] is not None and "image" in extra["mime_type"]:
|
||||||
|
data.update({"extras": extra})
|
||||||
self._data["tests"].append(data)
|
self._data["tests"].append(data)
|
||||||
self._write()
|
self._write()
|
||||||
|
|
||||||
|
|
|
@ -737,7 +737,6 @@ class HTMLReport:
|
||||||
test_report.longrepr = full_text
|
test_report.longrepr = full_text
|
||||||
test_report.extra = extras
|
test_report.extra = extras
|
||||||
test_report.duration = duration
|
test_report.duration = duration
|
||||||
|
|
||||||
if wasxfail:
|
if wasxfail:
|
||||||
test_report.wasxfail = True
|
test_report.wasxfail = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue