Skip to content

test: Add comprehensive tests for code_stats plugin#168

Open
newffnow wants to merge 3 commits intoScottcjn:mainfrom
newffnow:test/code-stats
Open

test: Add comprehensive tests for code_stats plugin#168
newffnow wants to merge 3 commits intoScottcjn:mainfrom
newffnow:test/code-stats

Conversation

@newffnow
Copy link
Contributor

Tests Added for code_stats Plugin - Closes #133

Test Coverage:

  • TOOL_DEF structure validation (4 tests)
  • Happy path analysis (6 tests)
  • Edge cases (8 tests)
  • Skip logic (2 tests)
  • Language mapping (2 tests)

Total: 22 test functions

Test Categories:

  1. Tool definition validation
  2. Basic codebase analysis
  3. Language detection
  4. File/line counting
  5. TODO/FIXME/HACK markers
  6. Error handling
  7. Skip directory logic

All tests use pytest fixtures.

newffnow and others added 3 commits March 20, 2026 03:09
)

- Added view_image tool: reads image files as base64 for vision models
- Added screenshot tool: captures screen on Windows/macOS/Linux
- Added /screenshot slash command
- Updated system prompt with vision model instructions
- Supports PNG, JPG, GIF, WebP formats
- Uses stdlib base64 module (zero dependencies)

Wallet: newffnow-github
- 31 tests covering all core functionality:
  - File operations (read, write, edit)
  - Command execution with timeout
  - Search and find files
  - Directory listing
  - Config system
  - Undo system
  - Achievement tracking
  - Git operations
  - Token estimation
  - Path resolution
  - Hardware detection
- GitHub Actions workflow for CI (Ubuntu, macOS, Windows)
- Tests zero-dependency guarantee
- All tests pass on Python 3.8-3.12

Bonus: Added CI workflow that verifies zero external dependencies

Wallet: newffnow-github
@Scottcjn
Copy link
Owner

NEEDS WORK — Good test coverage but conflicts with #146 (sayanget, just merged) which puts tests under tests/ directory. Please:

  1. Rebase against main
  2. Move tests to tests/ to match [BOUNTY] Add Pytest Suite (#63) and /pipe Command (#66) #146 layout
  3. Remove duplicate CI workflow (already added by [BOUNTY] Add Pytest Suite (#63) and /pipe Command (#66) #146)

3 RTC on merge after rebase.

@Scottcjn
Copy link
Owner

Looks good! Has merge conflicts with main — can you rebase? Will merge once conflicts are resolved.

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.

[BOUNTY: 3 RTC] Write tests for an untested tool

2 participants