()
| 505 | |
| 506 | #[test] |
| 507 | fn test_seq_concat() { |
| 508 | let gil = Python::acquire_gil(); |
| 509 | let py = gil.python(); |
| 510 | let v: Vec<i32> = vec![1, 2, 3]; |
| 511 | let seq = v |
| 512 | .to_py_object(py) |
| 513 | .into_object() |
| 514 | .cast_into::<PySequence>(py) |
| 515 | .unwrap(); |
| 516 | let concat_seq = seq |
| 517 | .concat(py, &seq) |
| 518 | .unwrap() |
| 519 | .cast_into::<PySequence>(py) |
| 520 | .unwrap(); |
| 521 | assert_eq!(6, concat_seq.len(py).unwrap()); |
| 522 | let concat_v: Vec<i32> = vec![1, 2, 3, 1, 2, 3]; |
| 523 | for (el, cc) in seq.iter(py).unwrap().zip(concat_v) { |
| 524 | assert_eq!(cc, el.unwrap().extract::<i32>(py).unwrap()); |
| 525 | } |
| 526 | } |
| 527 | |
| 528 | #[test] |
| 529 | fn test_seq_concat_string() { |
nothing calls this directly
no test coverage detected