Add unit tests#1
Merged
Merged
Conversation
- 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
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 1.0.1 -> 1.0.2
Add comprehensive unit test covering all core modules with 59 passing test.
Changes