Commit c2c2fe5
authored
Extract Time Utility Helpers and Add Moniker/ROT Time-Related Tests (#914)
* refactor: Extract time structure helpers to `time_structs_helper.py`
Moved `SYSTEMTIME` structure and related `kernel32` API calls,
`SystemTimeToFileTime` and `CompareFileTime` helper functions from
`test/test_storage.py` to `test/time_structs_helper.py`.
This improves modularity and reusability of time-related utility functions
within the test suite.
* test: Add tests for `IRunningObjectTable` change time methods.
This commit introduces a new test class to `test/test_rot.py`.
It verifies the functionality of `NoteChangeTime` and `GetTimeOfLastChange` by
setting and retrieving the last change time of a registered COM object.
* test: Add test for `IMoniker.GetTimeOfLastChange` method.
It verifies the functionality of `IMoniker.GetTimeOfLastChange` for file
monikers by creating and modifying a temporary file and asserting that the
`FILETIME` returned by `GetTimeOfLastChange` reflects the modification.1 parent e51ff94 commit c2c2fe5
4 files changed
Lines changed: 92 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
179 | 199 | | |
180 | 200 | | |
181 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 23 | | |
45 | 24 | | |
46 | 25 | | |
| |||
65 | 44 | | |
66 | 45 | | |
67 | 46 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 47 | | |
79 | 48 | | |
80 | 49 | | |
| |||
91 | 60 | | |
92 | 61 | | |
93 | 62 | | |
94 | | - | |
95 | | - | |
96 | | - | |
| 63 | + | |
97 | 64 | | |
98 | 65 | | |
99 | 66 | | |
| |||
218 | 185 | | |
219 | 186 | | |
220 | 187 | | |
221 | | - | |
222 | | - | |
223 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
224 | 191 | | |
225 | | - | |
| 192 | + | |
226 | 193 | | |
227 | 194 | | |
228 | 195 | | |
| |||
270 | 237 | | |
271 | 238 | | |
272 | 239 | | |
273 | | - | |
274 | | - | |
275 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
276 | 243 | | |
277 | 244 | | |
278 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments