()
| 469 | |
| 470 | #[test] |
| 471 | fn test_seq_iter() { |
| 472 | let gil = Python::acquire_gil(); |
| 473 | let py = gil.python(); |
| 474 | let v: Vec<i32> = vec![1, 1, 2, 3, 5, 8]; |
| 475 | let seq = v |
| 476 | .to_py_object(py) |
| 477 | .into_object() |
| 478 | .cast_into::<PySequence>(py) |
| 479 | .unwrap(); |
| 480 | let mut idx = 0; |
| 481 | for el in seq.iter(py).unwrap() { |
| 482 | assert_eq!(v[idx], el.unwrap().extract::<i32>(py).unwrap()); |
| 483 | idx += 1; |
| 484 | } |
| 485 | assert_eq!(idx, v.len()); |
| 486 | } |
| 487 | |
| 488 | #[test] |
| 489 | fn test_seq_strings() { |
nothing calls this directly
no test coverage detected