()
| 721 | |
| 722 | #[test] |
| 723 | fn map_with_kwargs() { |
| 724 | pyo3::prepare_freethreaded_python(); |
| 725 | Python::with_gil(|py| { |
| 726 | let km = PyKernelModule::new(); |
| 727 | let x = km.arg("x"); |
| 728 | let spec = km.elementwise(x).unwrap(); |
| 729 | |
| 730 | let kwargs = pyo3::types::PyDict::new(py); |
| 731 | let buf = PyBuffer::new(Buffer::from_f64_vec(vec![1.0, 2.0])); |
| 732 | kwargs |
| 733 | .set_item("x", buf.into_pyobject(py).unwrap()) |
| 734 | .unwrap(); |
| 735 | let map_spec = km.map(&spec, Some(&kwargs.as_borrowed())).unwrap(); |
| 736 | assert_eq!(map_spec.args.len(), 1); |
| 737 | }); |
| 738 | } |
| 739 | |
| 740 | #[test] |
| 741 | fn map_with_scalar_kwarg() { |
nothing calls this directly
no test coverage detected