Skip to content

Fixing Select.expect implementation to fit with ExpectBase refactor - #522

Merged
Rodrigo Brandão (rodrigobr-msft) merged 1 commit into
mainfrom
users/robrandao/select-expect
Aug 4, 2026
Merged

Fixing Select.expect implementation to fit with ExpectBase refactor#522
Rodrigo Brandão (rodrigobr-msft) merged 1 commit into
mainfrom
users/robrandao/select-expect

Conversation

@rodrigobr-msft

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings August 4, 2026 20:17
@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) marked this pull request as ready for review August 4, 2026 20:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 return ExpectBase[ModelT] instead of Expect.
  • Remove a test that asserted the old concrete Expect return 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.

@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) merged commit 7ef8a9b into main Aug 4, 2026
11 checks passed
@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) deleted the users/robrandao/select-expect branch August 4, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants