-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Conversation
Tests/test_image_resize.py
Outdated
@@ -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) |
There was a problem hiding this comment.
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
Line 2192 in 86634b8
return self._new(self.im.resize(size, resample, box)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
2247c8d
to
04199b6
Compare
This is commits 2-6 from #6653.