The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(agent): drain truncation warnings before and after each prompt-builder test
Teknium04dd2bb233a0
diff --git a/tests/agent/test_prompt_builder.py b/tests/agent/test_prompt_builder.pyindex a92c2255bc1..fe28afa2f6a 100644--- a/tests/agent/test_prompt_builder.py+++ b/tests/agent/test_prompt_builder.py@@ -45,7 +45,12 @@ def _drain_truncation_warnings():Truncation warnings ride a ContextVar; under plain ``pytest`` (noper-file subprocess isolation) anything this file records leaks intolater files' contexts and breaks their assertions/ordering.++ Drain on both sides: before, so warnings leaked by earlier files can't+ pollute this file's assertions, and after, so this file leaves the+ ContextVar clean for later files."""+ drain_truncation_warnings()yielddrain_truncation_warnings()