Skip to content

Commit 0bf42da

Browse files
authored
gh-107461 ctypes: Add a testcase for nested _as_parameter_ lookup (GH-107462)
1 parent 59ae215 commit 0bf42da

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Lib/test/test_ctypes/test_as_parameter.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,16 @@ class AsParamPropertyWrapperTestCase(BasicWrapTestCase):
221221
wrap = AsParamPropertyWrapper
222222

223223

224+
class AsParamNestedWrapperTestCase(BasicWrapTestCase):
225+
"""Test that _as_parameter_ is evaluated recursively.
226+
227+
The _as_parameter_ attribute can be another object which
228+
defines its own _as_parameter_ attribute.
229+
"""
230+
231+
def wrap(self, param):
232+
return AsParamWrapper(AsParamWrapper(AsParamWrapper(param)))
233+
234+
224235
if __name__ == '__main__':
225236
unittest.main()

0 commit comments

Comments
 (0)