Commit 8fec088
authored
Refactor
* refactor: Move `CreateTypeLib` import to top-level in `test_basic.py`.
Relocate `CreateTypeLib` from `BasicTest.test_guid` to the top level of
`test/test_basic.py` to follow project conventions.
* refactor: Use `SYS_WIN32` constant in `test_basic.py`.
Replace magic number `1` with `SYS_WIN32` in `_CreateTypeLib2` calls.
* refactor: Use public `CreateTypeLib` in `test_basic.py`.
Replace internal `_CreateTypeLib2` calls with public `CreateTypeLib`.
The primary goal of these tests is to verify the basic mechanics of COM
pointers, such as reference counting and `QueryInterface` behavior, which are
common to all COM interfaces.
Testing low-level, private functions like `_CreateTypeLib2` is not the
objective here.
* refactor: Remove redundant `IUnknown` import in `test_basic.py`.
Remove the redundant inline import of `IUnknown` from the `test_IUnknown`
method, as it is already imported at the top level of `test/test_basic.py`.
* refactor: Remove commented-out code in `test_basic.py`.
Remove a redundant commented-out `import` statement from the top of
`test/test_basic.py`.
* test: Verify `IUnknown` instance in `test_basic.py`.
Add assertions to `BasicTest.test_refcounts` and `BasicTest.test_qi` to verify
that the object returned by `CreateTypeLib` is an instance of `IUnknown`.test_basic.py to use public APIs. (#936)1 parent 80ed427 commit 8fec088
1 file changed
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | | - | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
27 | | - | |
28 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| |||
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
38 | | - | |
39 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
118 | | - | |
119 | | - | |
120 | 117 | | |
121 | 118 | | |
122 | 119 | | |
| |||
0 commit comments