Skip to content

Commit 9979635

Browse files
[3.11] gh-107461 ctypes: Add a testcase for nested _as_parameter_ lookup (GH-107462) (GH-114859)
(cherry picked from commit 0bf42da) Co-authored-by: Tomas R <[email protected]>
1 parent 8d2a193 commit 9979635

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Lib/ctypes/test/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)