algoo / preview-generator

generates previews of files with cache management
https://pypi.org/project/preview-generator/
MIT License
236 stars 51 forks source link

Enhanced the test cases for xcf files #291

Closed a523 closed 2 years ago

a523 commented 2 years ago

https://github.com/algoo/preview-generator/issues/286

PR Goal

The test case judges whether the generated image is expected by directly comparing the difference between the two image files

Implemented solution

Use this ImageHash library to do this

Checkpoints

a523 commented 2 years ago

@inkhey please have a look for this

inkhey commented 2 years ago

@a523 Thanks for this contribution. Can you merge the typing fix i just created in https://github.com/algoo/preview-generator/pull/292 ?

I discovered that this test doesn't work properly on my own environnement (it work for 2 to 19 hash size), most probably due to using old library (imagemagick or other).

The PR is ok and run on automated test environnement (unfortunately, i have to create a specific branch for now to check myself the automated test, our CI process is not adapted for external contribution for now), so as soon as you merge the typing fix, i can merge it.

a523 commented 2 years ago

@inkhey Hi, I have merged this brach .