()
| 314 | |
| 315 | #[test] |
| 316 | fn test_array_intopyobject_impl() { |
| 317 | Python::attach(|py| { |
| 318 | let bytes: [u8; 6] = *b"foobar"; |
| 319 | let obj = bytes.into_pyobject(py).unwrap(); |
| 320 | assert!(obj.is_instance_of::<PyBytes>()); |
| 321 | let obj = obj.cast_into::<PyBytes>().unwrap(); |
| 322 | assert_eq!(obj.as_bytes(), &bytes); |
| 323 | |
| 324 | let nums: [u16; 4] = [0, 1, 2, 3]; |
| 325 | let obj = nums.into_pyobject(py).unwrap(); |
| 326 | assert!(obj.is_instance_of::<PyList>()); |
| 327 | }); |
| 328 | } |
| 329 | |
| 330 | #[test] |
| 331 | fn test_extract_non_iterable_to_array() { |
nothing calls this directly
no test coverage detected