Ensure that unit tests can be executed under version of Windows different than the one used for building NVDA#12835
Merged
seanbudd merged 3 commits intonvaccess:masterfrom Sep 13, 2021
Conversation
…dows than the one used to create virtual env
Member
|
@michaelDCurran I've requested your review here as I'm not certain of the implications of changes to comtypesMonkeyPatches. |
seanbudd
reviewed
Sep 13, 2021
Member
seanbudd
left a comment
There was a problem hiding this comment.
These changes generally look good to me - I am concerned if there are any issues with addon compatibility breaking with the refactor to comtypesMonkeyPatches.
seanbudd
reviewed
Sep 13, 2021
michaelDCurran
approved these changes
Sep 13, 2021
Member
michaelDCurran
left a comment
There was a problem hiding this comment.
This restructuring looks okay to me. I don't have any concirns that this would break add-ons either.
I have not done a thorough review of all moved code though, I just looked at the structure.
seanbudd
approved these changes
Sep 13, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
None. Regression from #12617 Discovered when working on #12753 as that PR required executing unit tests under various versions of Windows
Summary of the issue:
It is sometimes useful to execute unit tests under various versions of Windows where it is impractical, or even impossible to have full build environment for NVDA. With current master some tests are failing because when importing COM interfaces comtypes complains about them being created on different version of Windows. Before PR #12617 this worked by chance since our monkey patches for compypes were applied when importing
coreand it just so happened that core was imported before any COM interface was.Description of how this pull request fixes the issue:
Since we have monkey patch which stops comtypes from complaining about typelib being different than COM interface it has been applied to comtypes before tests starts. To avoid copying code of this monkey patch it was necessary to refactor our monkey patches to make each of them into a separate function - that allows us to apply them selectively rather than just all of them during import.
Testing strategy:
core.CallCancelledis raised when appropriate.Known issues with pull request:
None known
Change log entries:
None needed.
Code Review Checklist: