Skip to content

Commit

Permalink
Test 0
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 4, 2024
1 parent 607acbf commit 28e5b92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Tests/test_imagegrab.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ def test_grab_invalid_xdisplay(self) -> None:

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

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

0 comments on commit 28e5b92

Please sign in to comment.