MCPcopy Create free account
hub / github.com/PyO3/pyo3 / test_function_with_custom_conversion_error

Function test_function_with_custom_conversion_error

tests/test_pyfunction.rs:238–251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

236
237#[test]
238fn test_function_with_custom_conversion_error() {
239 Python::attach(|py| {
240 let custom_conv_func = wrap_pyfunction!(function_with_custom_conversion)(py).unwrap();
241
242 py_expect_exception!(
243 py,
244 custom_conv_func,
245 "custom_conv_func(['a'])",
246 PyTypeError,
247 "'list' object is not an instance of 'datetime'",
248 "while processing 'timestamp'"
249 );
250 });
251}
252
253#[test]
254fn test_from_py_with_defaults() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected