test: Add comprehensive tests (fixes #13)#18
Merged
smiley-maker merged 1 commit intosmiley-maker:mainfrom Dec 15, 2025
Merged
Conversation
…e_every (fixes smiley-maker#13) Add new test file with 25 comprehensive tests covering: 1. Registry with Strings: - Optimizer accepts string personality names - All registered personalities are resolvable - Unknown personality strings raise KeyError 2. Registry with Objects: - Optimizer accepts function personalities - Optimizer accepts class instance personalities - Optimizer accepts lambda personalities 3. Adding to Registry: - Can register new personalities - Can register class-based personalities - Cannot overwrite without flag - Can overwrite with explicit flag 4. Specific Personality Tests: - Wholesome behavior (first step, decrease, increase) - Sassy behavior (first step, decrease, increase) - QuietPersonality respects interval 5. message_every Smoothing: - Counts steps correctly - Averages losses over window - Tracks previous window average - Zero disables messages - One emits every step 6. Integration Scenarios: - Full training loop with string personality - Switching personalities mid-training - Disabled optimizer produces no messages Total tests: 35 passed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Owner
|
Thank you for adding these tests! This is a huge quality-of-life improvement for the project. Strengthening the test coverage at this stage is incredibly valuable, and I really appreciate the care you put into this. |
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
Add 25 new comprehensive tests covering all requirements from Issue #13.
Tests Added
1. Registry with Strings
2. Registry with Objects
3. Adding to Registry
4. Specific Personality Tests
5. message_every Smoothing and Averages
6. Integration Scenarios
Test Results
All 35 tests pass.
Fixes #13