diff --git a/src/conversions/std/map.rs b/src/conversions/std/map.rs index 0ce0c18b2c6..888bd13c180 100644 --- a/src/conversions/std/map.rs +++ b/src/conversions/std/map.rs @@ -7,10 +7,7 @@ use crate::ToPyObject; use crate::{ conversion::IntoPyObject, instance::Bound, - types::{ - any::PyAnyMethods, dict::PyDictMethods, mappingproxy::PyMappingProxyMethods, PyDict, - PyMappingProxy, - }, + types::{any::PyAnyMethods, dict::PyDictMethods, PyDict}, FromPyObject, IntoPy, PyAny, PyErr, PyObject, Python, }; diff --git a/src/types/mappingproxy.rs b/src/types/mappingproxy.rs index a04aa55d155..4230c7159ce 100644 --- a/src/types/mappingproxy.rs +++ b/src/types/mappingproxy.rs @@ -160,10 +160,6 @@ mod tests { .get_item(8i32) .unwrap_err() .is_instance_of::(py)); - let map: HashMap = [(7, 32)].iter().cloned().collect(); - assert_eq!(map, mappingproxy.extract().unwrap()); - let map: BTreeMap = [(7, 32)].iter().cloned().collect(); - assert_eq!(map, mappingproxy.extract().unwrap()); }); } @@ -321,36 +317,6 @@ mod tests { }); } - #[test] - fn test_hashmap_to_python() { - Python::with_gil(|py| { - let mut map = HashMap::::new(); - map.insert(1, 1); - - let dict = map.clone().into_py_dict(py).unwrap(); - let py_map = PyMappingProxy::new(py, dict.as_mapping()); - - assert_eq!(py_map.len().unwrap(), 1); - assert_eq!(py_map.get_item(1).unwrap().extract::().unwrap(), 1); - assert_eq!(map, py_map.extract().unwrap()); - }); - } - - #[test] - fn test_btreemap_to_python() { - Python::with_gil(|py| { - let mut map = BTreeMap::::new(); - map.insert(1, 1); - - let dict = map.clone().into_py_dict(py).unwrap(); - let py_map = PyMappingProxy::new(py, dict.as_mapping()); - - assert_eq!(py_map.len().unwrap(), 1); - assert_eq!(py_map.get_item(1).unwrap().extract::().unwrap(), 1); - assert_eq!(map, py_map.extract().unwrap()); - }); - } - #[test] fn test_hashmap_into_python() { Python::with_gil(|py| {