Remove debug `Image._wedge` by hugovk · Pull Request #8755 · python-pillow/Pillow

The Python Image._wedge function is marked as "for debugging only".

The C wedge function does the same as the C linear_gradient function.

We call the Python Image._wedge() twice in tests. Both of these can be replaced with Image.linear_gradient(mode="L").

Also a bit of test code cleanup:

  • The global data variable isn't used in tests, let's remove it and save a redundant file load
  • Rename an open() helper so as not to shadow the builtin