()
| 468 | |
| 469 | #[test] |
| 470 | fn unbind_works() { |
| 471 | let arr: Py<PyArray1<_>> = Python::attach(|py| { |
| 472 | let arr = PyArray::from_slice(py, &[1_i32, 2, 3]); |
| 473 | |
| 474 | arr.unbind() |
| 475 | }); |
| 476 | |
| 477 | Python::attach(|py| { |
| 478 | let arr = arr.bind(py); |
| 479 | |
| 480 | assert_eq!(arr.readonly().as_slice().unwrap(), &[1, 2, 3]); |
| 481 | }); |
| 482 | } |
| 483 | |
| 484 | #[test] |
| 485 | fn copy_to_works() { |
nothing calls this directly
no test coverage detected