()
| 231 | |
| 232 | #[test] |
| 233 | fn to_pyarray_object_vec() { |
| 234 | Python::attach(|py| { |
| 235 | let dict = PyDict::new(py); |
| 236 | let string = PyString::new(py, "Hello:)"); |
| 237 | #[allow(clippy::useless_vec)] // otherwise we do not test the right trait impl |
| 238 | let vec = vec![dict.into_any().unbind(), string.into_any().unbind()]; |
| 239 | |
| 240 | let arr = vec.to_pyarray(py); |
| 241 | |
| 242 | for (a, b) in vec.iter().zip(arr.readonly().as_slice().unwrap().iter()) { |
| 243 | assert_eq!( |
| 244 | a.bind(py).compare(b).map_err(|e| e.print(py)).unwrap(), |
| 245 | Ordering::Equal |
| 246 | ); |
| 247 | } |
| 248 | }); |
| 249 | } |
| 250 | |
| 251 | #[test] |
| 252 | fn to_pyarray_object_array() { |
nothing calls this directly
no test coverage detected