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

Clean up tests (simplified) #6865

Merged
merged 4 commits into from
Jan 7, 2023
Merged

Conversation

Yay295
Copy link
Contributor

@Yay295 Yay295 commented Jan 6, 2023

This is commits 2-6 from #6653.

@@ -57,13 +57,13 @@ def test_convolution_modes(self):
Image.Resampling.LANCZOS,
),
)
def test_reduce_filters(self, resample):
r = self.resize(hopper("RGB"), (15, 12), resample)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is 'resampling_filter' clearer? 'resample' is the name of the variable when the core resize operation is called in Image.py

return self._new(self.im.resize(size, resample, box))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since your clear intention to just get part of #6653 merged, I'll save this change for that PR, and merge the rest.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because "resample" is an action, while "resampling filter" is an object. The thing being passed is (an ID for) a resampling filter, not a "resample". It doesn't work to say that "resample" is the type of the thing being passed either, because the type of the thing being passed is a Resampling enum item.

@radarhere radarhere added the automerge Automatically merge PRs that are ready label Jan 7, 2023
@mergify mergify bot merged commit 6c7d6cf into python-pillow:main Jan 7, 2023
@Yay295 Yay295 deleted the test_cleanup_s branch January 7, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PRs that are ready Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants