A simple image diff plugin for pytest
Project description
pytest-Inomaly
===================================
[![Build Status](https://ci.digitaloctave.com/api/badges/oly/pytest-inomaly/status.svg)](https://ci.digitaloctave.com/oly/pytest-inomaly)
A simple image diff plugin for pytest currently provides two new methods, use full for testing image related code and making sure the results do not change unexpectedly.
- pytest.idiff - returns true or false
- pytest.idiff_variance - returns the difference between the two images
Requirements
------------
Requires scipy and pytest to calculate the differences.
- scipy
- pytest
Installation
------------
You can install "pytest-Inomaly" via `pip`_ from `PyPI`_::
$ pip install pytest-Inomaly
Usage
-----
Assert images are identical.
assert idiff(path_to_first_image, path_to_second_image) is True
Assert images are almost identical, allow some variation for anti aliasing or similar.
assert idiff(path_to_first_image, path_to_second_image, tolerance=0.1) is True
Same as the above two method but will return the difference as a value instead of true or false.
assert idiff_tolerance(path_to_first_image, path_to_second_image, tolerance=0.1) == 3.14
Contributing
------------
Contributions are very welcome. Tests can be run with `tox`_, please ensure
the coverage at least stays the same before you submit a pull request.
License
-------
Distributed under the terms of the `MIT`_ license, "pytest-Inomaly" is free and open source software
Issues
------
If you encounter any problems, please `file an issue`_ along with a detailed description.
===================================
[![Build Status](https://ci.digitaloctave.com/api/badges/oly/pytest-inomaly/status.svg)](https://ci.digitaloctave.com/oly/pytest-inomaly)
A simple image diff plugin for pytest currently provides two new methods, use full for testing image related code and making sure the results do not change unexpectedly.
- pytest.idiff - returns true or false
- pytest.idiff_variance - returns the difference between the two images
Requirements
------------
Requires scipy and pytest to calculate the differences.
- scipy
- pytest
Installation
------------
You can install "pytest-Inomaly" via `pip`_ from `PyPI`_::
$ pip install pytest-Inomaly
Usage
-----
Assert images are identical.
assert idiff(path_to_first_image, path_to_second_image) is True
Assert images are almost identical, allow some variation for anti aliasing or similar.
assert idiff(path_to_first_image, path_to_second_image, tolerance=0.1) is True
Same as the above two method but will return the difference as a value instead of true or false.
assert idiff_tolerance(path_to_first_image, path_to_second_image, tolerance=0.1) == 3.14
Contributing
------------
Contributions are very welcome. Tests can be run with `tox`_, please ensure
the coverage at least stays the same before you submit a pull request.
License
-------
Distributed under the terms of the `MIT`_ license, "pytest-Inomaly" is free and open source software
Issues
------
If you encounter any problems, please `file an issue`_ along with a detailed description.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest-Inomaly-0.1.0.tar.gz
(3.5 kB
view details)
File details
Details for the file pytest-Inomaly-0.1.0.tar.gz
.
File metadata
- Download URL: pytest-Inomaly-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4e704bb2444337c3a765353991691b1fad98351385aefafdad528c96abbd7a4 |
|
MD5 | 6c291bd0741befc1100f3cc34a498869 |
|
BLAKE2b-256 | 776a52c91a1cd4bf40d4e0c4df0ddd3a8b009b6cbfce696a0d15748547bc8137 |