Metadata-Version: 2.1
Name: pyimagetest
Version: 0.1
Summary: Utilities for unit testing with images.
Home-page: https://github.com/pmeier/pyimagetest
Author: Philip Meier
Author-email: github.pmeier@posteo.de
License: BSD-3
Description: # pyimagetest
        
        [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
        
        `pyimagetest` provides utilities for unit testing with images. 
        
        `pyimagetest.ImageTestcase` is an `ABC` meant for double inheritance with `unittest.Testcase`. It adds the `assertImagesAlmostEqual` method. The compared image objects do not have to be from the same `pyimagetest.ImageBackend`. As long as the backend is known to `pyimagetest.ImageTestcase` it is inferred automatically.
        
        Currently the following `ImageBackend`s are supported off-the-shelf:
        - `imageio` 
        - `PIL`
        
        Custom backends can be added by subclassing `ImageBackend`.
        
        ## Example usage
        
        ```python
        import unittest
        import pyimagetest
        
        
        class Tester(pyimagetest.ImageTestcase, unittest.TestCase):
            @property
            def default_test_image_file(self):
                return "path/to/default/test/image/file"
            
            def test_io(self):
                imageio_image = self.load_image("imageio")
                pil_image = self.load_image("PIL")
                self.assertImagesAlmostEqual(imageio_image, pil_image)
        
        if __name__ == "__main__":
            unittest.main()
        ```
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Testing :: Unit
Requires-Python: >=3.6
Description-Content-Type: text/markdown
