MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / test_extract_range_to_vec

Function test_extract_range_to_vec

src/objects/sequence.rs:633–642  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

631
632 #[test]
633 fn test_extract_range_to_vec() {
634 let gil = Python::acquire_gil();
635 let py = gil.python();
636 let v: Vec<i32> = py
637 .eval("range(1, 5)", None, None)
638 .unwrap()
639 .extract(py)
640 .unwrap();
641 assert!(v == [1, 2, 3, 4]);
642 }
643
644 #[test]
645 fn test_extract_bytearray_to_vec() {

Callers

nothing calls this directly

Calls 3

pythonMethod · 0.80
evalMethod · 0.80
extractMethod · 0.45

Tested by

no test coverage detected