Open
Conversation
Implemented unit tests for the accounting module covering: - `martian_cost_list` function: Tests for successful fetching, caching behavior, error handling (HTTP errors, network errors, invalid JSON), and default client creation - `get_llm_cost` function: Tests for basic cost calculation, request charges, decimal precision, error handling (missing model, missing usage), None pricing fields, zero tokens, and large token counts The tests use mocking to avoid external API calls and verify correct behavior across various scenarios including edge cases and error conditions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Comprehensive test coverage for mini_swe_agent.py including: - Action parsing (single/multiple blocks, whitespace, multiline commands) - Execution flow (success, timeout, format errors, exit codes) - Final output detection and submission markers - Template rendering for system, instance, action observation, and errors - Message management Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
User description
Summary
mini_swe_agent.pycovering all core functionalityminisweagentpackageTest Coverage
Action Parsing (
TestParseAction)Execution Monitoring (
TestRaiseIfFinished)MINI_SWE_AGENT_FINAL_OUTPUTandCOMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUTmarkersAction Execution (
TestExecuteAction)Template Rendering (
TestHelperFunctions)Message Management (
TestMessageManagement)🤖 Generated with Claude Code
Generated description
Adds comprehensive unit tests for the
MiniSWECodeAgentwithin thearesmodule, ensuring the reliability of its action parsing, execution, and templating logic. Introduces new tests for the LLM cost accounting functions, verifying accurate model pricing retrieval and usage cost calculations.martian_cost_listfunction, ensuring correct fetching and caching of LLM model pricing, and forget_llm_cost, verifying accurate calculation of LLM usage costs with various scenarios.Modified files (1)
Latest Contributors(0)
MiniSWECodeAgent's core functionalities, including action parsing logic, execution flow with timeout and error handling, template rendering functions, and message management.Modified files (1)
Latest Contributors(0)