Catch subprocess.CalledProcessError in test_grab_x11

This commit is contained in:
Andrew Murray 2026-04-21 07:51:50 +10:00
parent 087376dc18
commit 9867b51d89

View File

@ -35,7 +35,7 @@ class TestImageGrab:
ImageGrab.grab()
ImageGrab.grab(xdisplay="")
except OSError as e:
except (OSError, subprocess.CalledProcessError) as e:
pytest.skip(str(e))
@pytest.mark.skipif(Image.core.HAVE_XCB, reason="tests missing XCB")