MCPcopy Create free account
hub / github.com/AI45Lab/Code / py_to_step_spec_minimal_defaults_optionals

Function py_to_step_spec_minimal_defaults_optionals

sdk/python/src/lib.rs:7454–7467  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7452
7453 #[test]
7454 fn py_to_step_spec_minimal_defaults_optionals() {
7455 pyo3::prepare_freethreaded_python();
7456 Python::with_gil(|py| {
7457 let dict = PyDict::new(py);
7458 dict.set_item("task_id", "t1").unwrap();
7459 dict.set_item("agent", "explore").unwrap();
7460 dict.set_item("description", "d").unwrap();
7461 dict.set_item("prompt", "p").unwrap();
7462 let spec = py_to_step_spec(py, dict.as_any()).unwrap();
7463 assert_eq!(spec.max_steps, None);
7464 assert_eq!(spec.parent_session_id, None);
7465 assert_eq!(spec.output_schema, None);
7466 });
7467 }
7468
7469 #[test]
7470 fn py_to_step_spec_missing_required_field_errors() {

Callers

nothing calls this directly

Calls 1

py_to_step_specFunction · 0.85

Tested by

no test coverage detected