TotallyNotChase / glitch-this

:camera: Glitchify images and GIF - with highly customizable options!
MIT License
1.76k stars 63 forks source link

Add test support for glitch-this aarch64 #38

Closed odidev closed 2 years ago

odidev commented 2 years ago

Hi Team,

I tried testing glitch-this package on x86 and arm64 architectures but it is generating 4 failed with the pytest test command with the below error locally:

E       NameError: name 'glitcher' is not defined 

After investigation found that these two variables were not getting value through main, so added glitcher = ImageGlitcher() and fmt = 'png' to all four test cases.

Also, the while loop defined in test casetest_loop()is infinite and causing error, hence made it finite using a variable trip, definedtrip = 5 and decremented it.
It also worked when I defined trip=1 or I eliminated while loop.

Finally got successful test result of 4 passed on both architectures after the above mentioned changes.

Commit logs: https://github.com/odidev/glitch-this/commit/2183dfe90452117ab7d95d16b3e57ac27cd89bbd

Testing logs: build_and_test_glitch-this_arm64_with_py38(success).txt

Could you please share your feedback regarding this and suggest what can be done to test this over ARM64 server?

Thanks in advance.

TotallyNotChase commented 2 years ago

Despite its name test_script.py is not really a traditional test suite for glitch-this. It's not meant to be automated (using pytest or similar). The file is mostly there to provide examples to the user, and helping the developer test that the API still works. But human intervention is still required to actually see the resulting images and make sure they look correct for their config.

Oh and yeah, the infinite loop is intentional. You can use a signal (e.g CTRL + C) to break out of it.

I don't think you need to bring a real testing framework into this. Since it's not meant to be an automated test anyway. You should be able to use the library and the commandline without any issues though - the latest release is fully tested manually.

odidev commented 2 years ago

Thank you for the help!