()
| 7468 | |
| 7469 | #[test] |
| 7470 | fn py_to_step_spec_missing_required_field_errors() { |
| 7471 | pyo3::prepare_freethreaded_python(); |
| 7472 | Python::with_gil(|py| { |
| 7473 | let dict = PyDict::new(py); |
| 7474 | dict.set_item("task_id", "t1").unwrap(); |
| 7475 | dict.set_item("agent", "explore").unwrap(); |
| 7476 | dict.set_item("description", "d").unwrap(); |
| 7477 | // No "prompt" — a required field with no serde default. |
| 7478 | let err = py_to_step_spec(py, dict.as_any()).unwrap_err(); |
| 7479 | assert!( |
| 7480 | err.to_string().contains("AgentStepSpec") || err.to_string().contains("prompt"), |
| 7481 | "got: {err}" |
| 7482 | ); |
| 7483 | }); |
| 7484 | } |
| 7485 | |
| 7486 | #[test] |
| 7487 | fn step_outcome_to_py_uses_snake_case_keys() { |
nothing calls this directly
no test coverage detected