8000 ctypes: Add a test case for nested _as_parameter_ attribute · python/cpython@59e6ba1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 59e6ba1

Browse files
committed
ctypes: Add a test case for nested _as_parameter_ attribute
1 parent 3979150 commit 59e6ba1

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+
6419 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)
0