diff --git a/tests/test_enum.rs b/tests/test_enum.rs index d6ae380f..54fdd6eb 100644 --- a/tests/test_enum.rs +++ b/tests/test_enum.rs @@ -6,7 +6,7 @@ use pyo3::{py_run, wrap_pyfunction}; mod common; #[pyclass] -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, PartialEq, Eq, Clone)] pub enum MyEnum { Variant, OtherVariant, @@ -163,7 +163,7 @@ fn test_repr_parse() { } #[pyclass(name = "MyEnum")] -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, PartialEq, Eq, Clone)] pub enum RenameEnum { Variant, } @@ -177,7 +177,7 @@ fn test_rename_enum_repr_correct() { } #[pyclass] -#[derive(Debug, PartialEq, Clone)] +#[derive(Debug, PartialEq, Eq, Clone)] pub enum RenameVariantEnum { #[pyo3(name = "VARIANT")] Variant, diff --git a/tests/test_frompyobject.rs b/tests/test_frompyobject.rs index f429ce26..d83f8b89 100644 --- a/tests/test_frompyobject.rs +++ b/tests/test_frompyobject.rs @@ -532,7 +532,7 @@ fn test_from_py_with_tuple_struct_error() { }); } -#[derive(Debug, FromPyObject, PartialEq)] +#[derive(Debug, FromPyObject, PartialEq, Eq)] pub enum ZapEnum { Zip(#[pyo3(from_py_with = "PyAny::len")] usize), Zap(String, #[pyo3(from_py_with = "PyAny::len")] usize), @@ -552,7 +552,7 @@ fn test_from_py_with_enum() { }); } -#[derive(Debug, FromPyObject, PartialEq)] +#[derive(Debug, FromPyObject, PartialEq, Eq)] #[pyo3(transparent)] pub struct TransparentFromPyWith { #[pyo3(from_py_with = "PyAny::len")] diff --git a/tests/test_gc.rs b/tests/test_gc.rs index 33a47d97..0184719c 100644 --- a/tests/test_gc.rs +++ b/tests/test_gc.rs @@ -176,7 +176,7 @@ fn inheritance_with_new_methods_with_drop() { let typeobj = py.get_type::(); let inst = typeobj.call((), None).unwrap(); - let obj: &PyCell = PyTryInto::try_into(&*inst).unwrap(); + let obj: &PyCell = PyTryInto::try_into(inst).unwrap(); let mut obj_ref_mut = obj.borrow_mut(); obj_ref_mut.data = Some(Arc::clone(&drop_called1)); let base: &mut BaseClassWithDrop = obj_ref_mut.as_mut(); diff --git a/tests/test_gc_pyproto.rs b/tests/test_gc_pyproto.rs index c4113070..de887c76 100644 --- a/tests/test_gc_pyproto.rs +++ b/tests/test_gc_pyproto.rs @@ -195,7 +195,7 @@ fn inheritance_with_new_methods_with_drop() { let typeobj = py.get_type::(); let inst = typeobj.call((), None).unwrap(); - let obj: &PyCell = PyTryInto::try_into(&*inst).unwrap(); + let obj: &PyCell = PyTryInto::try_into(inst).unwrap(); let mut obj_ref_mut = obj.borrow_mut(); obj_ref_mut.data = Some(Arc::clone(&drop_called1)); let base: &mut BaseClassWithDrop = obj_ref_mut.as_mut();