Skip to content

Commit

Permalink
add a test for assert_pyclass_sync to fix coverage error
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed Oct 30, 2024
1 parent a7381a0 commit 9e50a84
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/impl_/pyclass/assertions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ impl<T> PyClassSync<true> for T {}
// an implementation for `false`` to avoid a useless diagnostic.
#[cfg(not(diagnostic_namespace))]
impl<T> PyClassSync<false> for T {}

mod tests {
use super::assert_pyclass_sync;

#[test]
fn test_assert_pyclass_sync() {
#[crate::pyclass(crate = "crate")]
struct IntWrapper {}
assert_pyclass_sync::<IntWrapper, true>();
}
}

0 comments on commit 9e50a84

Please sign in to comment.