Fix API breakage with pytest 9.1.0#22
Merged
Merged
Conversation
Owner
|
Thank you! Could you please also update |
Contributor
Author
|
Done. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #22 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 93 96 +3
Branches 26 27 +1
=========================================
+ Hits 93 96 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Ah, now we're breaking compat with earlier pytest versions. |
mweinelt
force-pushed
the
pytest-9.1.0-compat
branch
from
June 15, 2026 15:23
b7b786f to
9d84da3
Compare
The ndiff value matches the previous default.
mweinelt
force-pushed
the
pytest-9.1.0-compat
branch
from
June 15, 2026 15:24
9d84da3 to
ee34a5d
Compare
utapyngo
reviewed
Jun 15, 2026
mweinelt
force-pushed
the
pytest-9.1.0-compat
branch
from
June 15, 2026 16:48
ee34a5d to
7fb5750
Compare
7 tasks
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.
The ndiff value matches the previous default.
pytest-dev/pytest@58d8b55
________________________________ test_unordered ________________________________ def test_unordered(): > assert [{"a": 1, "b": 2}, 2, 3] == unordered(2, 3, {"b": 2, "a": 3}) test_replace.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /nix/store/hminjv65d9b6di6l0ivxj92wrbcdhym3-python3.14-pytest-9.1.0/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:498: in _call_reprcompare custom = util._reprcompare(ops[i], each_obj[i], each_obj[i + 1]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /nix/store/hminjv65d9b6di6l0ivxj92wrbcdhym3-python3.14-pytest-9.1.0/lib/python3.14/site-packages/_pytest/assertion/__init__.py:180: in callbinrepr hook_result = ihook.pytest_assertrepr_compare( /nix/store/483a909gxsl0wzbyp9dfrb2ksi42r7i6-python3.14-pluggy-1.6.0/lib/python3.14/site-packages/pluggy/_hooks.py:512: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /nix/store/483a909gxsl0wzbyp9dfrb2ksi42r7i6-python3.14-pluggy-1.6.0/lib/python3.14/site-packages/pluggy/_manager.py:120: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /nix/store/483a909gxsl0wzbyp9dfrb2ksi42r7i6-python3.14-pluggy-1.6.0/lib/python3.14/site-packages/pluggy/_manager.py:475: in traced_hookexec return outcome.get_result() ^^^^^^^^^^^^^^^^^^^^ /nix/store/483a909gxsl0wzbyp9dfrb2ksi42r7i6-python3.14-pluggy-1.6.0/lib/python3.14/site-packages/pluggy/_manager.py:472: in <lambda> lambda: oldcall(hook_name, hook_impls, caller_kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <_pytest.config.Config object at 0x7ffff54a9a90>, op = '==' left = [{'a': 1, 'b': 2}, 2, 3], right = [{'b': 2, 'a': 3}, 2, 3] def pytest_assertrepr_compare( config: Config, op: str, left: Any, right: Any, ) -> list[str] | None: if (isinstance(left, UnorderedList) or isinstance(right, UnorderedList)) and op == "==": verbose = config.getoption("verbose") left_repr = saferepr(left) right_repr = saferepr(right) result = [f"{left_repr} {op} {right_repr}"] left_type = left.expected_type if isinstance(left, UnorderedList) else type(left) right_type = right.expected_type if isinstance(right, UnorderedList) else type(right) if left_type and right_type and left_type != right_type: result.append("Type mismatch:") result.append(f"{left_type} != {right_type}") extra_left, extra_right = _compare_eq_unordered(left, right) if len(extra_left) == 1 and len(extra_right) == 1: result.append("One item replaced:") if pytest.version_tuple < (8, 0, 0): # pragma: no cover result.extend( _compare_eq_any(extra_left[0], extra_right[0], verbose=verbose), # type: ignore[call-arg] ) else: result.extend( > _compare_eq_any( extra_left[0], extra_right[0], highlighter=config.get_terminal_writer()._highlight, # noqa: SLF001 verbose=verbose, ), ) E TypeError: _compare_eq_any() missing 1 required positional argument: 'assertion_text_diff_style' /build/source/pytest_unordered/__init__.py:118: TypeError