Minimalist visual regression testing helpers
Project description
tinyvdiff
Minimalist visual regression testing helpers.
Installation
You can install tinyvdiff from PyPI:
pip3 install tinyvdiff
Or install the development version from GitHub:
git clone https://github.com/nanxstats/tinyvdiff.git
cd tinyvdiff
python3 -m pip install -e .
Why tinyvdiff?
Designing a visual regression testing framework involves balancing several competing challenges, particularly when it comes to the snapshot file format used for comparisons. The ideal format must meet three seemingly conflicting criteria:
- Support for diverse input types: Graphics and documents are often generated using different tools and formats (for example, PNG and PDF), making direct comparisons difficult.
- Bitwise reproducibility in plain text: The format should capture the precise appearance of the output while being deterministic and easy to inspect visually.
- Platform independence: Subtle differences in system fonts or dependencies can lead to inconsistent outputs across environments, yet the format should produce visually identical results on any system.
tinyvdiff takes a pragmatic approach by relaxing the third criterion and making reasonable assumptions about the first to deliver a simple yet effective solution:
- Input files must be in vector PDF format, which are then converted to vector SVG snapshots, leaving it to developers to choose the tools and workflows for generating the PDFs.
- PDFs are converted to vector SVG using
pdf2svg
for comparison. - We assume it is sufficient to run visual regression tests in a single CI/CD operating system environment. Snapshots should be generated in a similar OS environment to ensure consistency with the CI/CD system.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tinyvdiff-0.1.0.tar.gz
.
File metadata
- Download URL: tinyvdiff-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e367b8895862d419774d572cdc955fc575b8b5eafdd7d7f3625bfb119d96085b |
|
MD5 | a09b4d6beb314b51aeb5424fec08c055 |
|
BLAKE2b-256 | 7c4504bf85c4a37bbb802fc72b53b596eb2c2c552c858ee50a35b28e210f6325 |
File details
Details for the file tinyvdiff-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: tinyvdiff-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07d9f56e50bd9db047c0206d24cfdc89950d34d9b158368389f226c979101ce6 |
|
MD5 | ebe7475901f69fcef16adfa560bde479 |
|
BLAKE2b-256 | 33beeee7c24b12fc9fa29e4d9720da9ebfd324e09f03c4069eda735cf7a5044a |