Skip to content

testPyComTest: cleanup imports and provide script for building #2512

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Apr 7, 2025

Follow-up to #2493
Extracted from #2502

msbuild .\PyCOMTest.sln -property:Configuration=Release
cd x64/Release
regsvr32 .\PyCOMTest.dll
run: com/TestSources/PyCOMTest/buildAndRegister.bat /s
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this likely to work even if the build or regsvr fails?

Copy link
Collaborator Author

@Avasam Avasam Apr 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step may pass. But the test would still fail if the registration fails.

I added this param because otherwise the step hangs forever, with the script waiting for confirmation to finish.

Suggested change
run: com/TestSources/PyCOMTest/buildAndRegister.bat /s
# Pass Silent flag to regsvr32 to avoid hanging on confirmation window
run: com/TestSources/PyCOMTest/buildAndRegister.bat /s

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the /s, but don't really see the benefit of the new .bat file, especially given it might be misleading when the build or registration fails.

Copy link
Collaborator Author

@Avasam Avasam Apr 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just meant as a helper script to build and register the required project for testing. And avoid duplication.
I could add the two lines instruction to com/win32com/test/readme.txt instead.

The helper message when the test finds the server isn't registered (what's assigned to importMsg) should probably direct the user to that readme explicitly.

When we were debugging PyComTests is took me a while to find it even existed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants