Repository navigation
feature: add unit tests for llm_utils, prompt_templates, agent_utils (coverage 42% → 44%) - #16
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: sachet.agarwal <sachet.agarwal@windsurf.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of a coverage push across COG-GTM repos. Measured baseline with
pytest -m 'not pricy' --cov=agentlab(MiniWoB server running): 42% statement coverage. This PR adds 33 focused unit tests for pure-logic modules that previously had large untested areas, raising overall coverage to 44% (100 passed, 15 skipped; the pre-existingtest_llm_error_no_successfailure needs a real OpenAI key and is unaffected).tests/llm/test_llm_utils_extra.py—messages_to_dict,extract_html_tags,parse_html_tags(_raise)(incl. optional keys, merge_multiple, retry messages),retry_multiple(success/retry/exhaustion via a mocked chat),generic_call_api_with_retries(valid + invalid-then-valid responses),image_to_{jpg,png}_base64_url,BaseMessage/SystemMessage/HumanMessage/AIMessage,Discussion(append/to_openai/merge/add_content).tests/llm/test_prompt_templates.py—PromptTemplate.format_message/construct_promptincl. error paths,get_prompt_templatelookup.tests/agents/test_agent_utils.py—draw_mouse_pointer,draw_click_indicator,draw_arrowhead(pixel assertions),zoom_webpage(mocked Page, invalid-factor ValueError).Formatted with
black. Reaching 70% overall requires covering the large untested modules (agent_xray.py713 stmts Gradio UI,tool_use_agent.py396,inspect_results.py309,study.py201…) — proposed as follow-up work.Link to Devin session: https://app.devin.ai/sessions/176aa77533c34040b8d9dd36595343fa
Requested by: @SachetCognition
Devin Review