Skip to content

Commit 28e5b92

Browse files
committed
Test 0
1 parent 607acbf commit 28e5b92

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tests/test_imagegrab.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ def test_grab_invalid_xdisplay(self) -> None:
5959

6060
@pytest.mark.skipif(sys.platform != "win32", reason="Windows only")
6161
def test_grab_invalid_handle(self) -> None:
62-
with pytest.raises(OSError):
62+
with pytest.raises(OSError, match="unable to get device context for handle"):
6363
ImageGrab.grab(window=-1)
64+
with pytest.raises(OSError, match="screen grab failed"):
65+
ImageGrab.grab(window=0)
6466

6567
def test_grabclipboard(self) -> None:
6668
if sys.platform == "darwin":

0 commit comments

Comments
 (0)