Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IMPORT_PYWIN32_FAILED flags to test_dispinterface and test_comserver. #693

Merged
merged 6 commits into from
Dec 8, 2024

Conversation

junkmd
Copy link
Collaborator

@junkmd junkmd commented Dec 8, 2024

See #688.

@junkmd junkmd added this to the 1.4.9 milestone Dec 8, 2024
@junkmd junkmd added the tests enhance or fix tests label Dec 8, 2024
@junkmd
Copy link
Collaborator Author

junkmd commented Dec 8, 2024

I have confirmed that test_win32com_ensure_dispatch fails at ce02f09.
Looking at the stack trace, this might be a bug on the pywin32 side.

ERROR: test_win32com_ensure_dispatch (test_dispinterface.Test_win32com)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\win32com\client\gencache.py", line 261, in GetModuleForCLSID
    __import__(sub_mod_name)
ModuleNotFoundError: No module named 'win32com.gen_py.6BAA1C79-4BA0-47F2-9AD7-D2FFB1C0F3E3x0x1x0.DTestDispServer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\comtypes\comtypes\comtypes\test\test_dispinterface.py", line 36, in test_win32com_ensure_dispatch
    d = EnsureDispatch("TestDispServerLib.TestDispServer")
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\win32com\client\gencache.py", line 636, in EnsureDispatch
    GetModuleForCLSID(disp_clsid)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\win32com\client\gencache.py", line 270, in GetModuleForCLSID
    makepy.GenerateChildFromTypeLibSpec(sub_mod, info)
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\win32com\client\makepy.py", line 374, in GenerateChildFromTypeLibSpec
    __import__("win32com.gen_py." + dir_name + "." + child)
  File "C:\Users\RUNNER~1\AppData\Local\Temp\gen_py\3.10\6BAA1C79-4BA0-47F2-9AD7-D2FFB1C0F3E3x0x1x0\DTestDispServer.py", line 28, in <module>
    class DTestDispServer(DispatchBaseClass):
  File "C:\Users\RUNNER~1\AppData\Local\Temp\gen_py\3.10\6BAA1C79-4BA0-47F2-9AD7-D2FFB1C0F3E3x0x1x0\DTestDispServer.py", line 48, in DTestDispServer
    def do_cy(self, value=Decimal('32.78')):
NameError: name 'Decimal' is not defined

I plan to skip this test with the @unittest.skip marker and open an issue on the pywin32 side.

junkmd added a commit to junkmd/pywinauto that referenced this pull request Dec 8, 2024
@junkmd junkmd linked an issue Dec 8, 2024 that may be closed by this pull request
@junkmd junkmd merged commit df2c5ac into enthought:main Dec 8, 2024
49 checks passed
@junkmd junkmd deleted the import_pywin32_flags branch December 8, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests enhance or fix tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revive pywin32 related tests.
1 participant