Replace Internet Explorer with MSXML in test_eventinterface.py.#933
Merged
junkmd merged 9 commits intoenthought:mainfrom Mar 7, 2026
Merged
Replace Internet Explorer with MSXML in test_eventinterface.py.#933junkmd merged 9 commits intoenthought:mainfrom
test_eventinterface.py.#933junkmd merged 9 commits intoenthought:mainfrom
Conversation
…erface.py`. - Relocate `import gc` and `import time` to the top of the file. - Removes redundant inline imports from `tearDown` and test methods.
….py`. - Replaces `InternetExplorer.Application` with `Msxml2.DOMDocument`. - Introduces `IPropertyNotifySink` and `MSXMLDocumentSink` for testing. - Updates test methods to verify default and non-default event interfaces using `MSXML`.
…erface.py`. - Document `OnChanged` and `OnRequestEdit` methods in `IPropertyNotifySink` with descriptions from official documentation to improve code clarity.
- Add descriptive comments to `IPropertyNotifySink` and `MSXMLDocumentSink` methods. - Clarify whether methods originate from the default dispatch interface or the `IPropertyNotifySink` interface.
- Clarify in `Test_MSXML.setUp` why `Msxml2.DOMDocument` is chosen as the test object, highlighting its support for multiple connection points.
- Add comments to `Test_MSXML` methods explaining the behavior of `GetEvents` when connecting to default vs. non-default source interfaces.
- Add a comment explaining the use of `gc.collect()` and `time.sleep()` in `Test_MSXML.tearDown` to ensure reliable COM resource release.
…rface.py`. - Clarify message loop processing during event wait. - Document expected event arrivals for default vs. non-default interfaces.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #933 +/- ##
==========================================
+ Coverage 88.59% 88.91% +0.32%
==========================================
Files 139 139
Lines 13613 13606 -7
==========================================
+ Hits 12060 12098 +38
+ Misses 1553 1508 -45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
related to #302
Overview
This PR replaces the dependency on
InternetExplorer.Applicationintest_eventinterface.pywithMsxml2.DOMDocument.This change ensures that the test suite can run reliably on modern Windows environments where Internet Explorer is no longer supported.
The PR also introduces the
IPropertyNotifySinkinterface definition and enhances documentation across the test file.Improved maintainability and clarity
Explicit documentation of test intent
The refactored tests now include detailed comments explaining why
MSXMLis used and what each test case verifies (e.g., default vs. non-default source interfaces).This makes the test logic transparent for new contributors and simplifies future debugging of event-related issues.
Consistent resource management
By centralizing imports like
gcandtimeand adding explanatory comments about resource cleanup intearDown.