Skip to content

Commit

Permalink
add rust tests so coverage picks up the new code
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed Oct 23, 2024
1 parent cc85332 commit 8f86b9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down Expand Up @@ -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);
});
}
Expand Down

0 comments on commit 8f86b9e

Please sign in to comment.