Add comprehensive test suite for core modules and LLM clients #74
+2,230
−0
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