Remove test_get_pybytes

This commit is contained in:
Alexander Niederbühl 2019-10-20 15:12:17 +02:00
parent b0925e1109
commit 69cbf1a494
1 changed files with 0 additions and 18 deletions

View File

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