diff --git a/tests/test_module.rs b/tests/test_module.rs index 7b97fb3a889..d69fe1d3f7b 100644 --- a/tests/test_module.rs +++ b/tests/test_module.rs @@ -37,7 +37,7 @@ fn double(x: usize) -> usize { } /// This module is implemented in Rust. -#[pymodule] +#[pymodule(supports_free_threaded = true)] fn module_with_functions(m: &Bound<'_, PyModule>) -> PyResult<()> { #[pyfn(m)] #[pyo3(name = "no_parameters")] @@ -182,6 +182,10 @@ fn test_module_from_code_bound() { .extract() .expect("The value should be able to be converted to an i32"); + adder_mod + .supports_free_threaded(true) + .expect("Disabling the GIL failed"); + assert_eq!(ret_value, 3); }); }