diff --git a/tests/test_class_basics.rs b/tests/test_class_basics.rs index c16546459d7..d19d106d206 100644 --- a/tests/test_class_basics.rs +++ b/tests/test_class_basics.rs @@ -235,10 +235,7 @@ fn test_unsendable() -> PyResult<()> { // Accessing the value inside this thread should not panic let caught_panic = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| -> PyResult<_> { - assert_eq!( - obj.bind(py).as_any().getattr("value")?.extract::()?, - 5 - ); + assert_eq!(obj.getattr(py, "value")?.extract::(py)?, 5); Ok(()) })) .is_err();