mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-20 05:04:24 +00:00
test(host-python): preserve pre-async hook coverage after execution handoff
This commit is contained in:
parent
a60a6a0a38
commit
79dd74e961
1 changed files with 6 additions and 3 deletions
|
|
@ -520,9 +520,9 @@ impl litellm_host_python::ExecutionBody for Preparing {
|
|||
|
||||
fn lifecycle(py: Python<'_>) -> PyResult<Bound<'_, PyModule>> {
|
||||
let source =
|
||||
std::ffi::CString::new(include_str!("../../../../litellm/rust_bridge/lifecycle.py"))
|
||||
std::ffi::CString::new(include_str!("../../../../litellm/rust_bridge/execution.py"))
|
||||
.unwrap();
|
||||
PyModule::from_code(py, &source, c"lifecycle.py", c"hook_chain_test_lifecycle")
|
||||
PyModule::from_code(py, &source, c"execution.py", c"hook_chain_test_lifecycle")
|
||||
}
|
||||
|
||||
#[rstest]
|
||||
|
|
@ -562,7 +562,10 @@ second = Hooks('b', invoke)
|
|||
let call = module
|
||||
.getattr("drive")
|
||||
.unwrap()
|
||||
.call1((Py::new(py, execution).unwrap(), module.getattr("Stream").unwrap()))
|
||||
.call1((
|
||||
Py::new(py, execution).unwrap(),
|
||||
module.getattr("AsyncStream").unwrap(),
|
||||
))
|
||||
.unwrap();
|
||||
locals.set_item("call", call).unwrap();
|
||||
py.run(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue