https://github.com/python/cpython/commit/0bf42dae7e73febc76ea96fd58af6b765a12b8a7 commit: 0bf42dae7e73febc76ea96fd58af6b765a12b8a7 branch: main author: Tomas R <tomas.ro...@gmail.com> committer: serhiy-storchaka <storch...@gmail.com> date: 2024-02-01T13:49:01+02:00 summary:
gh-107461 ctypes: Add a testcase for nested `_as_parameter_` lookup (GH-107462) files: M Lib/test/test_ctypes/test_as_parameter.py diff --git a/Lib/test/test_ctypes/test_as_parameter.py b/Lib/test/test_ctypes/test_as_parameter.py index a1a8745e737fa2..ca75e748256083 100644 --- a/Lib/test/test_ctypes/test_as_parameter.py +++ b/Lib/test/test_ctypes/test_as_parameter.py @@ -221,5 +221,16 @@ class AsParamPropertyWrapperTestCase(BasicWrapTestCase): wrap = AsParamPropertyWrapper +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() _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com