GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — gh-127183: Add `_ctypes.CopyComPointer` tests by junkmd · Pull Request #127184 · python/cpython Conversation
|
| dst_orig = create_shelllink_persist(self.IPersist) | ||
| dst = self.IPersist() | ||
| CopyComPointer(dst_orig, byref(dst)) | ||
| dst_orig.Release() # The refcount of `dst_orig` is 1 here. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Could the refcount be checked using Release's return value?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Indeed, since this assertion is not costly, it is better to simply call assertEqual than to leave a comment about it.
I have changed these lines.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
That's my intention, but as discussed in gh-126686, I believe publicizing it is also necessary for proper documentation. Before moving forward with documentation or publicizing, I want to backport this test to 3.13 and 3.12, where |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Make `create_shelllink_persist` top level function. * Add `CopyComPointerTests`. * Add more tests. * Update tests. * Add assertions for `Release`'s return value. (cherry picked from commit c7f1e3e) Co-authored-by: Jun Komoda <[email protected]>
|
GH-127251 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Make `create_shelllink_persist` top level function. * Add `CopyComPointerTests`. * Add more tests. * Update tests. * Add assertions for `Release`'s return value. (cherry picked from commit c7f1e3e) Co-authored-by: Jun Komoda <[email protected]>
|
GH-127252 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Makes sense. Thank you for the test! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…127251) gh-127183: Add `_ctypes.CopyComPointer` tests (GH-127184) * Make `create_shelllink_persist` top level function. * Add `CopyComPointerTests`. * Add more tests. * Update tests. * Add assertions for `Release`'s return value. (cherry picked from commit c7f1e3e) Co-authored-by: Jun Komoda <[email protected]>
…127252) gh-127183: Add `_ctypes.CopyComPointer` tests (GH-127184) * Make `create_shelllink_persist` top level function. * Add `CopyComPointerTests`. * Add more tests. * Update tests. * Add assertions for `Release`'s return value. (cherry picked from commit c7f1e3e) Co-authored-by: Jun Komoda <[email protected]>
* Make `create_shelllink_persist` top level function. * Add `CopyComPointerTests`. * Add more tests. * Update tests. * Add assertions for `Release`'s return value.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.