Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize Image Tests #369

Closed
sibre28 opened this issue Jun 16, 2023 · 1 comment · Fixed by #376
Closed

Standardize Image Tests #369

sibre28 opened this issue Jun 16, 2023 · 1 comment · Fixed by #376
Assignees
Labels
cleanup 🧹 Refactorings and other tasks that improve the code enhancement 💡 New feature or request released Included in a release

Comments

@sibre28
Copy link
Contributor

sibre28 commented Jun 16, 2023

Is your feature request related to a problem?

  • Currently some transformation methods in the _image.py file construct a new image using the Bytestream and therefore have to cover every file format individually. We would like to use a deep copy instead.

  • The tests in the test_image file have duplicate test cases for both .png and .jpg files. We would like to standardize those tests as well so we dont have to implement a test case for each file format.

Desired solution

Go through the transformation methods in _image.py and change the functionality of each method to use a deep Copy instead of a bytestream.

Go through the tests in test_image.py and remove every redundant test, that only test a different file format

The desired solution is already implemented in the methods Image.flip_vertically and Image.flip_horizontally as well as test_image.TestFlipVertically and test_image.TestFlipHorizontally

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

@sibre28 sibre28 added the enhancement 💡 New feature or request label Jun 16, 2023
@github-project-automation github-project-automation bot moved this to Backlog in Library Jun 16, 2023
@sibre28 sibre28 added the cleanup 🧹 Refactorings and other tasks that improve the code label Jun 16, 2023
@sibre28 sibre28 moved this from Backlog to Todo in Library Jun 16, 2023
@PhilipGutberlet PhilipGutberlet moved this from Todo to In Progress in Library Jun 16, 2023
@sibre28 sibre28 linked a pull request Jun 23, 2023 that will close this issue
@sibre28 sibre28 moved this from In Progress to Ready for Review in Library Jun 23, 2023
sibre28 added a commit that referenced this issue Jun 23, 2023
Closes #369.

### Summary of Changes

Changed functionality of Image transformation methods to use a deepCopy
instead of a bytestream to create a copy of the image.
Changed tests to only test one file format.

---------

Co-authored-by: PhilipGutberlet <92990487+PhilipGutberlet@users.noreply.github.com>
Co-authored-by: patrikguempel <patrikguempel@gmail.com>
Co-authored-by: Alexander <47296670+Marsmaennchen221@users.noreply.github.com>
Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Ready for Review to ✔️ Done in Library Jun 23, 2023
@lars-reimann
Copy link
Member

🎉 This issue has been resolved in version 0.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup 🧹 Refactorings and other tasks that improve the code enhancement 💡 New feature or request released Included in a release
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants