Skip to content

[Feat] cli testing#4

Merged
ryanm101 merged 4 commits intomainfrom
feat/cli_testing
Jan 15, 2026
Merged

[Feat] cli testing#4
ryanm101 merged 4 commits intomainfrom
feat/cli_testing

Conversation

@ryanm101
Copy link
Contributor

No description provided.

- CLITestHelper: Wrapper for Typer CliRunner with convenient methods
  - run(), run_with_temp_files(), mock_graph_load()
  - assert_success(), assert_failure() helpers

- MockConfig: Simple mock config objects for testing
- create_mock_client(): Factory for mock API clients

- typer is optional dependency (dev-only)
- Graceful ImportError if typer not available

- Add 17 comprehensive tests
- All 81 tests passing
- Mypy clean

Reduces CLI test boilerplate by ~40 lines per integration
- Fixed test_run_with_args to use --name option
- Simplified temp file test (dir cleaned up after context)
- All 79 tests passing
- Changed run_with_temp_files to not use context manager
- Caller responsible for cleanup (more flexible)
- Updated test to manually cleanup with shutil.rmtree
- All 79 tests passing
Added comprehensive test suites for previously untested modules:

**Config Module** (12 tests):
- AuthConfig and IntegrationConfig models
- Environment variable substitution
- Config file loading with YAML

**Registry Module** (4 tests):
- Integration registration decorator
- Get/list integrations
- Clear registry

**Utils Module** (13 tests):
- FieldMapper: field mapping and nested extraction
- IDCache: caching and fetch-or-get
- BatchProcessor: batching and rate limiting
- CommentBuilder: template building

Total: +29 tests, 108 tests passing
Coverage improvement: 75% → 92% (+17%)
@ryanm101 ryanm101 changed the title Feat/cli testing [Feat] cli testing Jan 15, 2026
@ryanm101 ryanm101 merged commit 7e7a1ea into main Jan 15, 2026
2 checks passed
@ryanm101 ryanm101 deleted the feat/cli_testing branch January 15, 2026 16:31
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.

1 participant