Fixing Select.expect implementation to fit with ExpectBase refactor - #522
Merged
Rodrigo Brandão (rodrigobr-msft) merged 1 commit intoAug 4, 2026
Merged
Conversation
Rodrigo Brandão (rodrigobr-msft)
marked this pull request as ready for review
August 4, 2026 20:17
Rodrigo Brandão (rodrigobr-msft)
requested a review
from a team
as a code owner
August 4, 2026 20:17
Copilot started reviewing on behalf of
Rodrigo Brandão (rodrigobr-msft)
August 4, 2026 20:17
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the testing framework’s fluent Select.expect() to align with the newer ExpectBase refactor, ensuring selections can produce the updated assertion object.
Changes:
- Switch
SelectBase.expect()to returnExpectBase[ModelT]instead ofExpect. - Remove a test that asserted the old concrete
Expectreturn type (without adding an updated contract assertion).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| dev/microsoft-agents-testing/microsoft_agents/testing/core/fluent/select.py | Updates expect() to use ExpectBase in line with the refactor. |
| dev/microsoft-agents-testing/tests/core/fluent/test_select.py | Removes the old “returns Expect” assertion test for expect(). |
Suppressed comments (1)
dev/microsoft-agents-testing/tests/core/fluent/test_select.py:59
- The test suite no longer asserts the contract of Select.expect() returning an Expect/ExpectBase-like assertion object. Instead of deleting the return-type assertion entirely, update it to validate the new ExpectBase-based design (and use the imported Expect so it doesn’t become unused).
def test_expect_with_correct_items(self):
"""expect() passes the current items to Expect."""
items = [{"name": "a"}, {"name": "b"}]
select = Select(items)
expect = select.expect()
assert expect._items == items
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Kyle Rohn (kylerohn-msft)
approved these changes
Aug 4, 2026
Rodrigo Brandão (rodrigobr-msft)
deleted the
users/robrandao/select-expect
branch
August 4, 2026 20:33
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.
No description provided.