()
| 36 | |
| 37 | |
| 38 | def test_bound_method_callback(): |
| 39 | # Bound Python method: |
| 40 | class MyClass: |
| 41 | def double(self, val): |
| 42 | return 2 * val |
| 43 | |
| 44 | z = MyClass() |
| 45 | assert m.test_callback3(z.double) == "func(43) = 86" |
| 46 | |
| 47 | z = m.CppBoundMethodTest() |
| 48 | assert m.test_callback3(z.triple) == "func(43) = 129" |
| 49 | |
| 50 | |
| 51 | def test_keyword_args_and_generalized_unpacking(): |