Skip to content

Conversation

@masonlet
Copy link
Owner

Summary 1.0.1 -> 1.0.2

Add comprehensive unit test covering all core modules with 59 passing test.

Changes

  • Add unit test for all 6 modules (config, utils, repository, cli, commands, profiles)
  • Set up GitHub Actions workflow for automated testing
  • Add pytest configuration
  • Update README with test badge and development instructions
  • Improve error handling in config module

- Add pytest as test dependency
- Configure pytest with minversion and test paths
- Implement tests for config.py covering:
  - Config file loading from multiple locations
  - JSON validation and error handling
  - Config save operations with path defaults
  - Nested key navigation with get_config_value
  - Interactive config creation with overwrite protection
- Implement tests for utils.py covering:
  - Prerequisites checking for git and cmake
  - Tool detection with verbose output
  - Command execution with error handling
- Implement unit tests for repository.py covering:
  - URL resolution for HTTPS and SSH protocols
  - HTTPS/SSH protocol selection
  - Default repository list from config and fallback
  - Repository cloning with directory existence checks
  - Clone failure handling
- Implement unit tests for cli.py covering:
  - Basic repository argument parsing
  - Repository requirement validation
  - Config defaults and CLI overriding defaults
  - Profile and config management without repo
  - Mono-repo mode activation via --repos and --profile
  - Mutual exclusivity of --repos and --profile
  - Default profile name handling
  - CMake arguments parsing
- Implement tests for commands.py covering:
  - Single repo cloning and building for new repos
  - Existing repo updates with user configuration
  - Build skipping with no_build flag
  - SSH URL usage when requested
  - Multi-repo cloning in mono-repo mode
  - Profile-based repository selection
  - Error handling for missing profile
  - Monorepo CMakeLists.txt generation
  - CMakeLists validation with repo names
- Implement tests for profiles.py covering:
  - Profile addition with new and existing names
  - Profiles dict creation when missing
  - Overwrite confirmation for existing profiles
  - Overwrite abort when declined
  - Insufficient arguments error handling
  - Profile removal with confirmation
  - Profile removal abort when declined
  - Nonexistent profile handling
  - Profile listing with multiple profiles
  - Empty profiles message
  - Missing profiles key handling
@masonlet masonlet merged commit a0ad240 into main Nov 14, 2025
1 check passed
@masonlet masonlet deleted the add-unit-tests branch November 14, 2025 06:21
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