Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

fix(dspy): stabilize local interpreter timeout test (#10404)

Isaac Millera4abaac3e591
diff --git a/tests/primitives/test_local_interpreter.py b/tests/primitives/test_local_interpreter.py
index fd87b7084..b4ce5a5cd 100644
--- a/tests/primitives/test_local_interpreter.py
+++ b/tests/primitives/test_local_interpreter.py
@@ -235,7 +235,7 @@ def test_execution_timeout_does_not_wait_for_blocked_host_tool():
interpreter.execute("blocked()")
elapsed = time.monotonic() - started
- assert tool_started.is_set()
+ assert tool_started.wait(timeout=1)
assert elapsed < 0.5
with pytest.raises(CodeInterpreterError, match="shut down"):
interpreter.execute("1")