Extract Time Utility Helpers and Add Moniker/ROT Time-Related Tests #914
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.
Overview
This pull request refactors time-related utility functions into a dedicated helper module and introduces new tests for time-sensitive operations within COM monikers and the Running Object Table (ROT).
These changes enhance the modularity of the test suite and improve the coverage of COM interaction capabilities concerning object lifetime and modification timestamps.
Enhanced Test Suite Modularity
Centralized Time-Related Utilities
The
SYSTEMTIMEstructure and associatedkernel32API calls, along with helper functionsSystemTimeToFileTimeandCompareFileTime, have been extracted fromtest/test_storage.pyinto a new, dedicated module:time_structs_helper.py.This improves the organization and reusability of time-related utilities, making the test suite cleaner and easier to maintain.
Verified Moniker Last Change Time Retrieval
New tests have been added to
test/test_moniker.pyto specifically validate theIMoniker.GetTimeOfLastChangemethod.This test ensures that when a file moniker's underlying file is modified, the
GetTimeOfLastChangemethod accurately reflects the updated modification timestamp.Accurate Running Object Table Time Management
Tests for
IRunningObjectTablehave been expanded intest/test_rot.pyto cover theNoteChangeTimeandGetTimeOfLastChangemethods.These tests verify that the ROT correctly records and retrieves the last change time of registered COM objects.