Skip to content

Commit

Permalink
Update test_safearray_pywin32.
Browse files Browse the repository at this point in the history
  • Loading branch information
junkmd committed Dec 7, 2024
1 parent 1b15f6e commit 39b2761
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions comtypes/test/test_safearray_pywin32.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

from comtypes.automation import VARIANT

try:
import pythoncom
# pywin32 is available. The pythoncom dll contains two handy
# exported functions that allow to create a VARIANT from a Python
# object, also a function that unpacks a VARIANT into a Python
# object.
#
# This allows us to create und unpack SAFEARRAY instances
# contained in VARIANTs, and check for consistency with the
# comtypes code.
except ImportError:
# pywin32 not installed...
raise unittest.SkipTest("This depends on 'pywin32'.")

raise unittest.SkipTest("This depends on 'pywin32'.")

import pythoncom
# pywin32 not installed...

# pywin32 is available. The pythoncom dll contains two handy
# exported functions that allow to create a VARIANT from a Python
# object, also a function that unpacks a VARIANT into a Python
# object.
#
# This allows us to create und unpack SAFEARRAY instances
# contained in VARIANTs, and check for consistency with the
# comtypes code.

_dll = PyDLL(pythoncom.__file__)

Expand Down

0 comments on commit 39b2761

Please sign in to comment.