Remove test_get_pybytes

This commit is contained in:
Alexander Niederbühl 2019-10-20 15:12:17 +02:00
parent b0925e1109
commit 69cbf1a494

View file

@ -1,31 +1,13 @@
use pyo3::prelude::*;
use pyo3::types::PyBytes;
use pyo3::wrap_pyfunction;
mod common;
#[pyfunction]
fn get_pybytes() -> PyObject {
let gil = Python::acquire_gil();
let py = gil.python();
PyBytes::new(py, b"Hello World").into()
}
#[pyfunction]
fn bytes_pybytes_conversion(bytes: &[u8]) -> &[u8] {
bytes
}
#[test]
fn test_get_pybytes() {
let gil = Python::acquire_gil();
let py = gil.python();
let get_bytes = wrap_pyfunction!(get_pybytes)(py);
py_assert!(py, get_bytes, "get_bytes() == b'Hello World'");
}
#[test]
fn test_pybytes_bytes_conversion() {
let gil = Python::acquire_gil();