We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 30dd02c + 6b286ed commit aedbc77Copy full SHA for aedbc77
Tests/test_imagegrab.py
@@ -1,4 +1,5 @@
1
import os
2
+import shutil
3
import subprocess
4
import sys
5
@@ -33,7 +34,9 @@ def test_grab_x11(self):
33
34
35
@pytest.mark.skipif(Image.core.HAVE_XCB, reason="tests missing XCB")
36
def test_grab_no_xcb(self):
- if sys.platform not in ("win32", "darwin"):
37
+ if sys.platform not in ("win32", "darwin") and not shutil.which(
38
+ "gnome-screenshot"
39
+ ):
40
with pytest.raises(OSError) as e:
41
ImageGrab.grab()
42
assert str(e.value).startswith("Pillow was built without XCB support")
0 commit comments