A basic HTML report for pytest using Jinja2 template engine. Based on pytest-reporter which provides the data to the template.
Features
Overview of files, tests, and phases with expandable sections
Includes information about tests such as documentation, markers, and fixtures
Fairly mobile friendly
Complies with Jenkins default CSP policy (with --split-report)
Support for pytest-metadata and pytest-rerunfailures
May be used as a base template for customization
Installation
You can install “pytest-reporter-html1” via pip from PyPI:
$ pip install pytest-reporter-html1
Usage
Specify the html1 template and the output path of the report:
$ pytest --template=html1/index.html --report=report.html
By default the report is self-contained, but you can separate CSS, images, and JavaScript by specifying the --split-report option.
Customization
You can inherit this template in your own to tailor parts of it to your own needs. It defines various blocks which you can override using template inheritance.
{% extends "html1/index.html" %}
{% block style %}
{{ super() }}
header {
background-color: black;
}
{% endblock %}
Some additional filters are available for templates to use:
- asset(path_or_content, extension)
Takes a path to a local file or a raw bytes object and either returns a base64 encoded URL or a new relative URL to a copy depending on if the report is self-contained or not.
<img src="{{ 'path/to/image.png'|asset }}"> <img src="{{ raw_byte_data|asset('png') }}">- ansi(s)
Convert ANSI color codes to HTML.
- strftime(value, format)
Format a Unix timestamp using datetime.strftime.
Started: {{ started|strftime('%Y-%m-%d %H:%M:%S') }}- timedelta(value)
Convert a time in seconds to a timedelta object.
- rst(s)
Convert reStructuredText to HTML.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Metadata
Release files for pytest-reporter-html1 0.9.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_reporter_html1-0.9.5.tar.gz | 99.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_reporter_html1-0.9.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 116.2 kB
Release files / pytest_reporter_html1-0.9.5.tar.gz
| Download URL | pytest_reporter_html1-0.9.5.tar.gz |
|---|---|
| Size | 99.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f80a123cf292a1fefc75ea86af7818719394e300ccbc1c8313789f00ee1b015
|
|
BLAKE2b-256 checksum How to use checksums |
6a3d59176bdcbadbd051d9229a51db71bbc404aa343e89391c4178d208cb7fe7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2025.
Transparency logRelease files / pytest_reporter_html1-0.9.5-py3-none-any.whl
| Download URL | pytest_reporter_html1-0.9.5-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe61d517343443f24849d2ec6753d46f61c39615a726e2e53f98e1c967c17d9b
|
|
BLAKE2b-256 checksum How to use checksums |
44e40a924045eb69ac0ca75fcfd9822539adb0f059ebf72d1563c6a53ca340dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2025.
Transparency log