Skip to content

Standardize Image Tests #369

@sibre28

Description

@sibre28

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

Metadata

Metadata

Labels

cleanup 🧹Refactorings and other tasks that improve the codereleasedIncluded in a release

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions