From 8f86b9ea8608d009f4eb08ef8520c8fdbde33a4e Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Wed, 23 Oct 2024 15:56:25 -0600 Subject: [PATCH] add rust tests so coverage picks up the new code --- tests/test_module.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); }); }