Conversation
There was a problem hiding this comment.
Pull request overview
This pull request updates tests and test recordings for the Cognitive Language Question Answering (CQA) SDK, affecting both the runtime (question answering) and authoring packages.
Changes:
- Removed metadata filter test coverage from question answering runtime tests (both sync and async)
- Replaced source-based tests with QnA-based tests in the authoring package
- Updated test recording asset tags to reflect new test recordings
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase.py | Removed test_query_knowledgebase_filter test that validated metadata filtering functionality |
| sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase_async.py | Removed async version of test_query_knowledgebase_filter test |
| sdk/cognitivelanguage/azure-ai-language-questionanswering/assets.json | Updated test recording asset tag |
| sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources.py | Renamed test_add_source to test_add_chitchat and changed from testing URL source addition to QnA pair addition |
| sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources_async.py | Async version of the same test rename and functionality change |
| sdk/cognitivelanguage/azure-ai-language-questionanswering-authoring/assets.json | Updated test recording asset tag |
...anguage/azure-ai-language-questionanswering-authoring/tests/test_update_knowledge_sources.py
Show resolved
Hide resolved
| @@ -52,29 +52,6 @@ def test_query_knowledgebase_with_answerspan(self, recorded_test, qna_creds): # | |||
| assert answer.short_answer.text | |||
| assert answer.short_answer.confidence is not None | |||
|
|
|||
There was a problem hiding this comment.
The removal of test_query_knowledgebase_filter eliminates test coverage for the metadata filtering functionality of the Question Answering client. This test validated that the QueryFilters with MetadataFilter work correctly to filter answers based on metadata. If this functionality is still supported by the API, consider whether this test removal is intentional or if it should be replaced with an updated version that works with the current backend.
| @@ -54,46 +54,6 @@ async def test_query_knowledgebase_with_short_answer(self, recorded_test, qna_cr | |||
| assert answer.short_answer.text | |||
| assert answer.short_answer.confidence is not None | |||
|
|
|||
There was a problem hiding this comment.
The removal of test_query_knowledgebase_filter eliminates async test coverage for the metadata filtering functionality. This test validated that the async client correctly handles QueryFilters with MetadataFilter to filter answers based on metadata. If this functionality is still supported by the API, consider whether this test removal is intentional or if it should be replaced with an updated version.
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines