Skip to content

refactor: Transform the comparator in 'assertion' into generators#14521

Merged
Pierre-Sassoulas merged 4 commits into
pytest-dev:mainfrom
Pierre-Sassoulas:yield-comparators
May 26, 2026
Merged

refactor: Transform the comparator in 'assertion' into generators#14521
Pierre-Sassoulas merged 4 commits into
pytest-dev:mainfrom
Pierre-Sassoulas:yield-comparators

Conversation

@Pierre-Sassoulas
Copy link
Copy Markdown
Member

Refactor prior to doing #13762 as suggested in #13762 (comment) and #13762 (comment)

@Pierre-Sassoulas Pierre-Sassoulas added the skip news used on prs to opt out of the changelog requirement label May 25, 2026
highlighter,
verbose,
assertion_text_diff_style,
explanation = list(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to call list at some point to keep the scope tight, but it could be refactored further later.

Copy link
Copy Markdown
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Would be good to also convert set/iterable/approx/any for consistency, but can be done later.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 34e0395 into pytest-dev:main May 26, 2026
33 checks passed
@Pierre-Sassoulas Pierre-Sassoulas deleted the yield-comparators branch May 26, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news used on prs to opt out of the changelog requirement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants