Fix/simplify event loop test#1405
Conversation
WalkthroughTest in the tool wrapper suite was renamed and simplified: it now checks that the event loop is accessed by asserting Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (7)**/*.py📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Files:
**/*.{py,yaml,yml,json,toml}📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Files:
**/test_*.py📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Files:
**/*.{py,js,ts,tsx,jsx,sh,yaml,yml,json,toml,md,mdx,rst}📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Files:
**/*.{py,md,mdx,rst}📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Files:
**/*⚙️ CodeRabbit configuration file
Files:
packages/**/*⚙️ CodeRabbit configuration file
Files:
🧬 Code graph analysis (1)packages/nvidia_nat_agno/tests/test_tool_wrapper.py (1)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
525ccff to
d61d01a
Compare
d61d01a to
8cf478b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/1.4 #1405 +/- ##
============================================
Coverage 74.95% 74.95%
============================================
Files 553 553
Lines 38835 38835
============================================
Hits 29109 29109
Misses 9726 9726
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
## Description fix: simplify event loop test to assert_called The test was checking exact call counts of get_running_loop() which varies by architecture, Python version, and pydantic-core version. This caused repeated CI failures (NVIDIA#1383, NVIDIA#1396). Simplified to assert_called() since: - Exact call count is an implementation detail - Other tests already cover the event loop code path - The previous approach was not sustainable Fixes: NVIDIA#1396 ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing/index.md). - We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. - Any contribution which contains commits that are not Signed-Off will not be accepted. - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Simplified event-loop verification by replacing architecture-dependent assertions with a basic check that the running event loop is accessed. * Renamed and clarified the related test to reflect that only access is validated, improving cross-environment reliability and maintainability. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: mnajafian-nv <mnajafian@nvidia.com>
Description
fix: simplify event loop test to assert_called
The test was checking exact call counts of get_running_loop() which
varies by architecture, Python version, and pydantic-core version.
This caused repeated CI failures (#1383, #1396).
Simplified to assert_called() since:
Fixes: #1396
By Submitting this PR I confirm:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.