()
| 287 | |
| 288 | #[test] |
| 289 | fn class_method_with_args() { |
| 290 | let gil = Python::acquire_gil(); |
| 291 | let py = gil.python(); |
| 292 | |
| 293 | let d = PyDict::new(py); |
| 294 | d.set_item(py, "C", py.get_type::<ClassMethodWithArgs>()) |
| 295 | .unwrap(); |
| 296 | py.run( |
| 297 | "assert C.method('abc') == 'ClassMethodWithArgs.method(abc)'", |
| 298 | None, |
| 299 | Some(&d), |
| 300 | ) |
| 301 | .unwrap(); |
| 302 | } |
| 303 | |
| 304 | py_class!(class StaticMethod |py| { |
| 305 | def __new__(cls) -> PyResult<StaticMethod> { |