Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
junkmd committed Jun 25, 2024
1 parent ba347c9 commit 852c5fb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions comtypes/test/test_dispifc_safearrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,24 @@ def test_in_safearray(self):
# modifies the safearray on the server side.
self.assertEqual(sa.unpack(), unpacked_content)

def test_in_safearray2(self):
for sa, expected, unpacked_content in [
(
self._create_consecutive_array().contents,
True,
self.UNPACKED_CONSECUTIVE_VALS,
),
# Also perform the inverted test. For this, create a safearray with zeros.
(
self._create_zero_array().contents,
False,
self.UNPACKED_ZERO_VALS,
),
]:
with self.subTest(expected=expected, unpacked_content=unpacked_content):
self.assertEqual(self._create_dispifc().VerifyArray(sa), expected)
self.assertEqual(pointer(sa).unpack(), unpacked_content)


if __name__ == "__main__":
unittest.main()

0 comments on commit 852c5fb

Please sign in to comment.