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

Improved wl-paste mimetype handling in ImageGrab #7094

Merged
merged 13 commits into from
May 24, 2023
Prev Previous commit
Next Next commit
Use tuple instead of list
  • Loading branch information
radarhere committed May 23, 2023
commit 26d5f4fcb1fa23c920f42c56e187de092da544a7
6 changes: 3 additions & 3 deletions Tests/test_imagegrab.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_grabclipboard_png(self):
@pytest.mark.skipif(
(
sys.platform != "linux"
or not all(shutil.which(cmd) for cmd in ["wl-paste", "wl-copy"])
or not all(shutil.which(cmd) for cmd in ("wl-paste", "wl-copy"))
),
reason="Linux with wl-clipboard only",
)
Expand All @@ -111,5 +111,5 @@ def test_grabclipboard_wl_clipboard(self, ext):
image_path = "Tests/images/hopper." + ext
with open(image_path, "rb") as fp:
subprocess.call(["wl-copy"], stdin=fp)
im = ImageGrab.grabclipboard()
assert_image_equal_tofile(im, image_path)
im = ImageGrab.grabclipboard()
assert_image_equal_tofile(im, image_path)