Skip to content

Add comprehensive test coverage for untested code paths#5

Merged
bsamek merged 6 commits intomainfrom
claude/improve-test-coverage-fnnEy
Jan 8, 2026
Merged

Add comprehensive test coverage for untested code paths#5
bsamek merged 6 commits intomainfrom
claude/improve-test-coverage-fnnEy

Conversation

@bsamek
Copy link
Copy Markdown
Owner

@bsamek bsamek commented Jan 7, 2026

Adds 27 new tests covering previously untested areas:

  • sanitize_id() function: 6 unit tests for dots, slashes, edge cases
  • SlashCommandAutoComplete.get_candidates(): 8 tests for all branches
  • ModelPanel.compose(): 2 tests verifying Static/RichLog composition
  • PromptInput edge cases: 3 tests (whitespace, case sensitivity)
  • handle_slash_command edge cases: 3 tests (whitespace, unknown cmds)
  • main() entry point: 1 test
  • Multiple operations: 2 tests (consecutive prompts, special chars)
  • SlashCommand dataclass: 2 tests (fields, handler validation)

Increases test count from 42 to 69 tests.

claude added 4 commits January 7, 2026 22:54
Adds 27 new tests covering previously untested areas:
- sanitize_id() function: 6 unit tests for dots, slashes, edge cases
- SlashCommandAutoComplete.get_candidates(): 8 tests for all branches
- ModelPanel.compose(): 2 tests verifying Static/RichLog composition
- PromptInput edge cases: 3 tests (whitespace, case sensitivity)
- handle_slash_command edge cases: 3 tests (whitespace, unknown cmds)
- main() entry point: 1 test
- Multiple operations: 2 tests (consecutive prompts, special chars)
- SlashCommand dataclass: 2 tests (fields, handler validation)

Increases test count from 42 to 69 tests.
The test incorrectly assumed " /new" would be treated as a regular
prompt. However, PromptInput.on_key() calls strip() before checking
if input starts with "/", so leading spaces are removed and the
command executes normally.

Updated test to verify this actual behavior.
@claude
Copy link
Copy Markdown

claude bot commented Jan 7, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

claude added 2 commits January 7, 2026 23:51
Add pytest-cov to dev dependencies and configure pytest to:
- Run coverage on app module by default
- Show missing lines in coverage report
- Fail if coverage drops below 100%

This runs automatically with `pytest` locally and in CI.
@bsamek bsamek merged commit c6904d7 into main Jan 8, 2026
1 check passed
@bsamek bsamek deleted the claude/improve-test-coverage-fnnEy branch January 8, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants