()
| 218 | |
| 219 | #[test] |
| 220 | fn test_function_with_custom_conversion() { |
| 221 | Python::attach(|py| { |
| 222 | let custom_conv_func = wrap_pyfunction!(function_with_custom_conversion)(py).unwrap(); |
| 223 | |
| 224 | pyo3::py_run!( |
| 225 | py, |
| 226 | custom_conv_func, |
| 227 | r#" |
| 228 | import datetime |
| 229 | |
| 230 | dt = datetime.datetime.fromtimestamp(1612040400) |
| 231 | assert custom_conv_func(dt) == 1612040400 |
| 232 | "# |
| 233 | ) |
| 234 | }); |
| 235 | } |
| 236 | |
| 237 | #[test] |
| 238 | fn test_function_with_custom_conversion_error() { |
nothing calls this directly
no outgoing calls
no test coverage detected