Skip to content

Commit d56f9c6

Browse files
committed
test: Verify stdole.IPicture.Type property after loading.
This is a direct validation of the `stdole.IPicture` interface's behavior.
1 parent acecbfa commit d56f9c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

comtypes/test/test_stream.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ def test_Clone(self):
237237
)
238238
_OleLoadPicture.restype = HRESULT
239239

240+
# Constants for the type of a picture object
241+
PICTYPE_BITMAP = 1
242+
240243
# Constants for GetDeviceCaps
241244
LOGPIXELSX = 88 # Logical pixels/inch in X
242245
LOGPIXELSY = 90 # Logical pixels/inch in Y
@@ -361,6 +364,7 @@ def test_ole_load_picture(self):
361364
byref(pic),
362365
)
363366
self.assertEqual(hr, hresult.S_OK)
367+
self.assertEqual(pic.Type, PICTYPE_BITMAP)
364368
pstm.RemoteSeek(0, STREAM_SEEK_SET)
365369
buf, read = pstm.RemoteRead(len(data))
366370
self.assertEqual(bytes(buf)[:read], data)

0 commit comments

Comments
 (0)