From d0d53d4bac853acaad51af7d6aa9582cad59945a Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 22 Jun 2024 17:02:28 +1000 Subject: [PATCH] Added type hints to tests --- Tests/test_imagegrab.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py index e23adeb70..5dfa51697 100644 --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -89,6 +89,7 @@ $bmp = New-Object Drawing.Bitmap 200, 200 p.communicate() im = ImageGrab.grabclipboard() + assert isinstance(im, list) assert len(im) == 1 assert os.path.samefile(im[0], "Tests/images/hopper.gif") @@ -105,6 +106,7 @@ $ms = new-object System.IO.MemoryStream(, $bytes) p.communicate() im = ImageGrab.grabclipboard() + assert isinstance(im, Image.Image) assert_image_equal_tofile(im, "Tests/images/hopper.png") @pytest.mark.skipif( @@ -120,6 +122,7 @@ $ms = new-object System.IO.MemoryStream(, $bytes) with open(image_path, "rb") as fp: subprocess.call(["wl-copy"], stdin=fp) im = ImageGrab.grabclipboard() + assert isinstance(im, Image.Image) assert_image_equal_tofile(im, image_path) @pytest.mark.skipif(