only works with specialization
()
| 610 | #[test] |
| 611 | #[cfg(feature = "nightly")] // only works with specialization |
| 612 | fn test_extract_byte_str_to_vec() { |
| 613 | let gil = Python::acquire_gil(); |
| 614 | let py = gil.python(); |
| 615 | let py_bytes = py.eval("b'Hello'", None, None).unwrap(); |
| 616 | let v = py_bytes.extract::<Vec<u8>>(py).unwrap(); |
| 617 | assert_eq!(b"Hello", &v[..]); |
| 618 | } |
| 619 | |
| 620 | #[allow(unused_variables)] // when compiling for py2.7 |
| 621 | #[test] |