Add comprehensive test suite for core modules and LLM clients#74
Open
koriyoshi2041 wants to merge 1 commit intoalexzhang13:mainfrom
Open
Add comprehensive test suite for core modules and LLM clients#74koriyoshi2041 wants to merge 1 commit intoalexzhang13:mainfrom
koriyoshi2041 wants to merge 1 commit intoalexzhang13:mainfrom
Conversation
- test_comms_utils.py: 34 tests for socket protocol and message dataclasses - test_openai.py: 23 tests for OpenAI client - test_anthropic.py: 27 tests for Anthropic client - test_rlm_logger.py: 18 tests for JSONL logging - test_lm_handler.py: 29 tests for LM routing and server lifecycle Total: 125 tests
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
This PR adds comprehensive unit tests for previously untested core modules and LLM client implementations, addressing the "Add better unit tests" item in CONTRIBUTING.md.
Changes
tests/test_comms_utils.py (34 tests)
tests/clients/test_openai.py (23 tests)
tests/clients/test_anthropic.py (27 tests)
tests/test_rlm_logger.py (18 tests)
tests/test_lm_handler.py (29 tests)
Testing
uv run pytest tests/test_comms_utils.py tests/clients/test_openai.py \ tests/clients/test_anthropic.py tests/test_rlm_logger.py \ tests/test_lm_handler.py -v # Result: 125 passedCode Quality
uv run ruff check: All checks passeduv run ruff format --check: All files formattedNotes
@pytest.mark.skipifand require API keysMockLMclass for unit testing without API callstest_local_repl.py,test_parsing.py,test_gemini.py