-
Notifications
You must be signed in to change notification settings - Fork 547
test(cli): add comprehensive CLI test suite and reorganize files #1339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1339 +/- ##
===========================================
+ Coverage 71.66% 73.78% +2.11%
===========================================
Files 171 171
Lines 17020 17020
===========================================
+ Hits 12198 12558 +360
+ Misses 4822 4462 -360
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive test coverage for the NemoGuardRails CLI and reorganizes the existing test files into a more structured directory layout.
Key changes:
- Move existing CLI tests to a dedicated
tests/cli/
directory structure - Add extensive test coverage for CLI commands including migration, provider management, debugger, and chat functionality
- Fix a potential AttributeError in the verbose logging module when handling log records
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/test_cli_migration.py | Removed - moved to tests/cli/test_migration.py |
tests/test_cli.py | Removed - moved to tests/cli/test_cli_main.py |
tests/cli/test_migration.py | New comprehensive test suite for CLI migration functionality |
tests/cli/test_llm_providers.py | New test suite for LLM provider selection and management |
tests/cli/test_debugger.py | New test suite for CLI debugger commands |
tests/cli/test_cli_main.py | New test suite for main CLI commands and functionality |
tests/cli/test_chat.py | New test suite for chat interface functionality |
nemoguardrails/logging/verbose.py | Fix AttributeError when log records lack 'id' attribute |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few nits. Curious to learn where Colang 2's syntax is written down to write tests against
|
||
class TestRunChat: | ||
@patch("asyncio.run") | ||
@patch.object(chat_module, "LLMRails") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the same chat_module
used throughout all these tests? Should we create it from scratch in each test to avoid mutations in a previous test changing the response?
tests for nemoguardrails CLI
requires #1343