Skip to content

[3.11] gh-107461 ctypes: Add a testcase for nested _as_parameter_ lookup (GH-107462) #114859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Lib/ctypes/test/test_as_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,16 @@ class AsParamPropertyWrapperTestCase(BasicWrapTestCase):

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

class AsParamNestedWrapperTestCase(BasicWrapTestCase):
"""Test that _as_parameter_ is evaluated recursively.

The _as_parameter_ attribute can be another object which
defines its own _as_parameter_ attribute.
"""

def wrap(self, param):
return AsParamWrapper(AsParamWrapper(AsParamWrapper(param)))


if __name__ == '__main__':
unittest.main()