-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Python: Add core types and agents unit tests #3470
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: main
Are you sure you want to change the base?
Conversation
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
Adds new unit tests to improve coverage for agent_framework core modules, focusing on content handling/validation utilities and agent option/name logic to support the coverage goals in issue #3356.
Changes:
- Added tests for
Contentbehaviors and internal helpers in_types.py(usage aggregation, media type detection, argument parsing, data URI decoding, content list parsing, URI validation). - Added tests for
_agents.pyinternals and edge cases (option merging, agent name sanitization,ChatAgentinit validation, thread creation).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| python/packages/core/tests/core/test_types.py | Adds coverage for Content operations and _types helper functions around parsing/validation and data URIs. |
| python/packages/core/tests/core/test_agents.py | Adds coverage for agent option merging/name sanitization and ChatAgent initialization/thread creation edge cases. |
Motivation and Context
This PR adds unit tests to improve coverage for the core
_types.pyand_agents.pymodules as part of issue #3356 (achieving 85-90% unit test coverage for agent-framework-core).Description
Added comprehensive unit tests for:
_types.py (82% → 85%)
_agents.py (81% → 83%)
Contribution Checklist