Skip to content

Commit 0cf136c

Browse files
[3.12] gh-107461 ctypes: Add a testcase for nested _as_parameter_ lookup (GH-107462) (GH-114858)
(cherry picked from commit 0bf42da) Co-authored-by: Tomas R <[email protected]>
1 parent 600724d commit 0cf136c

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
@@ -227,5 +227,16 @@ class AsParamPropertyWrapperTestCase(BasicWrapTestCase):
227227

228228
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
229229

230+
class AsParamNestedWrapperTestCase(BasicWrapTestCase):
231+
"""Test that _as_parameter_ is evaluated recursively.
232+
233+
The _as_parameter_ attribute can be another object which
234+
defines its own _as_parameter_ attribute.
235+
"""
236+
237+
def wrap(self, param):
238+
return AsParamWrapper(AsParamWrapper(AsParamWrapper(param)))
239+
240+
230241
if __name__ == '__main__':
231242
unittest.main()

0 commit comments

Comments
 (0)